WithMeta

Trait WithMeta 

Source
pub trait WithMeta {
    // Required methods
    fn meta(&self) -> Option<&Meta>;
    fn set_meta(&mut self, meta: Option<Meta>);

    // Provided method
    fn with_meta(self, meta: Meta) -> Self
       where Self: Sized { ... }
}
Expand description

Trait for types that can include _meta fields

Required Methods§

Source

fn meta(&self) -> Option<&Meta>

Get the _meta field

Source

fn set_meta(&mut self, meta: Option<Meta>)

Set the _meta field

Provided Methods§

Source

fn with_meta(self, meta: Meta) -> Self
where Self: Sized,

Add or update _meta field with builder pattern

Implementors§