Trait mz_transform::attribute::AttributeContainer

source ·
pub trait AttributeContainer<A: Attribute> {
    // Required methods
    fn push_attribute(&mut self, value: A);
    fn take_attribute(&mut self) -> Option<A>;
    fn attribute_is_enabled(&self) -> bool;
    fn get_attribute(&self) -> Option<&A>;
    fn get_mut_attribute(&mut self) -> Option<&mut A>;
}
Expand description

An API for manipulating the of type A an enclosing store.

Required Methods§

source

fn push_attribute(&mut self, value: A)

Push the attribute to the store.

source

fn take_attribute(&mut self) -> Option<A>

Take the attribute from the store, leaving its slot empty.

source

fn attribute_is_enabled(&self) -> bool

Check if the attribute is enabled.

source

fn get_attribute(&self) -> Option<&A>

Get an immutable reference to the attribute.

source

fn get_mut_attribute(&mut self) -> Option<&mut A>

Get a mutable reference to the attribute.

Implementors§