macro_rules! impl_content {
($struct:ident, $content_type:ident) => { ... };
}Expand description
Implement two traits allowing to select and navigate into a struct. It’s used for menu which share a common structure.
Implement the Selectable trait for struct $struc with content type $content_type.
This trait allows to navigate through a vector of element content_type.
It implements: is_empty, len, next, prev, set_index and selected_is_last.
Implement the Content trait for struct $struct with content type $content_type.
This trait allows to navigate through a vector of element content_type.
It implements: selected, content, push, style.
selected returns an optional reference to the value.