pub struct MenuItem<T> {
pub data: Option<T>,
/* private fields */
}Expand description
MenuItem is the node in menu tree. If children is not empty, then this item is the group item.
Fields§
§data: Option<T>Implementations§
source§impl<T> MenuItem<T>
impl<T> MenuItem<T>
sourcepub fn item(name: impl Into<Cow<'static, str>>, data: T) -> Self
pub fn item(name: impl Into<Cow<'static, str>>, data: T) -> Self
helper function to create an non group item.