Trait MetadataExt

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

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

Required Methods§

Source

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

Provided Methods§

Source

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

Source

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

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§