pub struct ContextSwitcherItem<'a> {
pub label: &'a str,
pub href: &'a str,
pub meta: Option<&'a str>,
pub badge_html: Option<TrustedHtml<'a>>,
pub active: bool,
pub disabled: bool,
}Fields§
§label: &'a str§href: &'a str§meta: Option<&'a str>§badge_html: Option<TrustedHtml<'a>>§active: bool§disabled: boolImplementations§
Source§impl<'a> ContextSwitcherItem<'a>
impl<'a> ContextSwitcherItem<'a>
pub const fn link(label: &'a str, href: &'a str) -> Self
pub const fn with_meta(self, meta: &'a str) -> Self
pub const fn with_badge(self, badge_html: TrustedHtml<'a>) -> Self
pub const fn active(self) -> Self
pub const fn disabled(self) -> Self
pub fn class_name(&self) -> &'static str
Trait Implementations§
Source§impl<'a> Clone for ContextSwitcherItem<'a>
impl<'a> Clone for ContextSwitcherItem<'a>
Source§fn clone(&self) -> ContextSwitcherItem<'a>
fn clone(&self) -> ContextSwitcherItem<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for ContextSwitcherItem<'a>
impl<'a> Debug for ContextSwitcherItem<'a>
Source§impl<'a> PartialEq for ContextSwitcherItem<'a>
impl<'a> PartialEq for ContextSwitcherItem<'a>
Source§fn eq(&self, other: &ContextSwitcherItem<'a>) -> bool
fn eq(&self, other: &ContextSwitcherItem<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'a> Copy for ContextSwitcherItem<'a>
impl<'a> Eq for ContextSwitcherItem<'a>
impl<'a> StructuralPartialEq for ContextSwitcherItem<'a>
Auto Trait Implementations§
impl<'a> Freeze for ContextSwitcherItem<'a>
impl<'a> RefUnwindSafe for ContextSwitcherItem<'a>
impl<'a> Send for ContextSwitcherItem<'a>
impl<'a> Sync for ContextSwitcherItem<'a>
impl<'a> Unpin for ContextSwitcherItem<'a>
impl<'a> UnsafeUnpin for ContextSwitcherItem<'a>
impl<'a> UnwindSafe for ContextSwitcherItem<'a>
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