pub struct SidebarItem { /* private fields */ }Expand description
A sidebar link with an optional icon, highlighted on its page.
Implementations§
Source§impl SidebarItem
impl SidebarItem
pub fn new() -> Self
Sourcepub fn class(self, v: impl Into<String>) -> Self
pub fn class(self, v: impl Into<String>) -> Self
Extra classes for the outer element. They win over the defaults.
Sourcepub fn with(self, part: impl Part) -> Self
pub fn with(self, part: impl Part) -> Self
Add an attribute (class(..), id(..), aria(..), …) or a child.
pub fn href(self, v: impl Into<String>) -> Self
pub fn icon(self, v: impl View) -> Self
Trait Implementations§
Source§impl Default for SidebarItem
impl Default for SidebarItem
Auto Trait Implementations§
impl !RefUnwindSafe for SidebarItem
impl !Sync for SidebarItem
impl !UnwindSafe for SidebarItem
impl Forget for SidebarItem
impl Freeze for SidebarItem
impl Move for SidebarItem
impl Send for SidebarItem
impl Unpin for SidebarItem
impl UnsafeUnpin for SidebarItem
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