Trait forest_filecoin::rpc::reflect::util::Optional

source ·
pub trait Optional<'de>: Deserialize<'de> {
    // Provided methods
    fn optional() -> bool { ... }
    fn unwrap_none() -> Self { ... }
}
Expand description

“Introspection” by tracing a Deserialize to see if it’s Option-like.

This allows us to smoothly translate between rust functions that take an optional parameter, and the content descriptors in OpenRPC.

Provided Methods§

source

fn optional() -> bool

source

fn unwrap_none() -> Self

§Panics

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'de, T> Optional<'de> for T
where T: Deserialize<'de>,