Struct NavItemProps
pub struct NavItemProps {
pub key: String,
pub label: String,
pub icon: Option<Icon>,
pub count: Option<i64>,
pub live: Option<i64>,
pub unread: bool,
pub mentions: Option<i64>,
pub item: Option<ResourceId>,
pub person: Option<Person>,
pub select: Event,
}Expand description
One place in a navigation list.
Fields§
§key: StringWhat names the place across changes: what selection reports.
label: StringWhat the place is called.
icon: Option<Icon>Its glyph.
count: Option<i64>How many things it holds: a quiet count in tertiary ink.
live: Option<i64>How many things wait for attention (unread, mentions): the list’s one filled badge, in the person’s colour; zero shows nothing.
unread: boolSomething new waits behind the place: its label stands out at rest.
mentions: Option<i64>How many things behind the place name the person (mentions): more specific than the place’s unread count, so it takes the badge’s place while there are any, as Slack’s one badge counts what names you rather than everything new.
item: Option<ResourceId>The resource the place stands for, when it is one (a channel): the host says how much
of it the person has not seen, in live, and lifts the label while anything is.
person: Option<Person>The person the place stands for, when it is one (a direct conversation): their avatar in the icon’s place, ringed in their presence colour, and their presence badge. The icon and the avatar never both show: the person takes the icon’s place.
select: EventThe place was chosen: what choosing it does, beside the list’s own select.
Trait Implementations§
§fn clone(&self) -> NavItemProps
fn clone(&self) -> NavItemProps
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read morefn describe() -> Description
§fn from_source(source: &mut dyn Source) -> Result<NavItemProps, Error>
fn from_source(source: &mut dyn Source) -> Result<NavItemProps, Error>
source gives. Read more§fn default() -> NavItemProps
fn default() -> NavItemProps
§fn from(props: NavItemProps) -> NavItem
fn from(props: NavItemProps) -> NavItem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more