MetadataExt

Trait MetadataExt 

Source
pub trait MetadataExt {
    type Meta: Clone + Debug + Send + Sync + 'static;

    // Required methods
    fn metadata(&self) -> Option<&Self::Meta>;
    fn metadata_mut(&mut self) -> Option<&mut Self::Meta>;
    fn set_metadata(&mut self, meta: Self::Meta);
}
Expand description

Trait for types that can carry metadata.

Required Associated Types§

Source

type Meta: Clone + Debug + Send + Sync + 'static

Required Methods§

Source

fn metadata(&self) -> Option<&Self::Meta>

Source

fn metadata_mut(&mut self) -> Option<&mut Self::Meta>

Source

fn set_metadata(&mut self, meta: Self::Meta)

Implementors§

Source§

impl<T, M> MetadataExt for MetaAttached<T, M>
where M: Clone + Debug + Send + Sync + 'static,

Source§

type Meta = M