pub struct NavItem {
pub id: String,
pub label: Option<String>,
pub icon: Option<Icon>,
pub count: Option<String>,
pub items: Vec<NavSubItem>,
}Expand description
An item of a nav.
Fields§
§id: StringThe select event’s item, and active’s value.
label: Option<String>The text (default the id).
icon: Option<Icon>An icon before the label.
count: Option<String>A small mono pill after the label.
items: Vec<NavSubItem>Sub-items: the item opens a menu or panel instead of being picked.
Implementations§
Sourcepub fn item(self, item: NavSubItem) -> Self
pub fn item(self, item: NavSubItem) -> Self
Adds a sub-item.
Trait Implementations§
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.