IterableDataAttrib

Trait IterableDataAttrib 

Source
pub trait IterableDataAttrib {
    // Required method
    fn iter_members(&self) -> IntoIter<(&'static str, &dyn Any)>;

    // Provided method
    fn iter_members_data_attribs(
        &self,
    ) -> IntoIter<(&'static str, usize, usize)> { ... }
}
Expand description

A helper trait for struct_iterable crate, give a struct that derives Iterable the ability to iterate the member’s offset and size

Required Methods§

Source

fn iter_members(&self) -> IntoIter<(&'static str, &dyn Any)>

A member that allows to get the iterator, this function is to be implemented

Provided Methods§

Source

fn iter_members_data_attribs(&self) -> IntoIter<(&'static str, usize, usize)>

Get an iterator that could give you the name, offset, and size of the struct members

Implementors§