pub struct DocNavItem {
pub id: String,
pub label: String,
pub href: Option<String>,
pub icon: Option<String>,
pub badge: Option<String>,
pub is_expanded: Signal<bool>,
pub children: Vec<DocNavItem>,
}Expand description
Single navigation item inside the doc sidebar.
Fields§
§id: String§label: String§href: Option<String>§icon: Option<String>§badge: Option<String>§is_expanded: Signal<bool>§children: Vec<DocNavItem>Implementations§
pub fn new(id: impl Into<String>, label: impl Into<String>) -> Self
pub fn has_active_child(&self, current_path: &str) -> bool
pub fn with_href(self, href: impl Into<String>) -> Self
pub fn with_icon(self, icon: impl Into<String>) -> Self
pub fn with_badge(self, badge: impl Into<String>) -> Self
pub fn with_children(self, children: Vec<DocNavItem>) -> Self
pub fn expanded(self, exp: bool) -> Self
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