Trait MetadataExt

Source
pub trait MetadataExt {
    // Required method
    fn with_type<M>(&self) -> Option<&[u8]>
       where M: MetadataType;

    // Provided methods
    fn metadata<M>(&self) -> Option<M>
       where M: Metadata + Message + Default { ... }
    fn protobuf<M>(&self) -> Option<M>
       where M: Metadata + Message + Default { ... }
    fn memo(&self) -> String { ... }
}

Required Methods§

Source

fn with_type<M>(&self) -> Option<&[u8]>
where M: MetadataType,

Provided Methods§

Source

fn metadata<M>(&self) -> Option<M>
where M: Metadata + Message + Default,

Source

fn protobuf<M>(&self) -> Option<M>
where M: Metadata + Message + Default,

Source

fn memo(&self) -> String

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§