pub struct TabItem { /* private fields */ }Expand description
One tab: a unique value, the caller’s label (also its accessible name when only the icon shows), an optional icon and badge.
Implementations§
Source§impl TabItem
impl TabItem
pub fn new( value: impl Into<SharedString>, label: impl Into<SharedString>, ) -> Self
pub fn icon(self, icon: impl Into<Icon>) -> Self
Sourcepub fn badge(self, badge: NavBadge) -> Self
pub fn badge(self, badge: NavBadge) -> Self
A badge on the icon, or after the label of a tab without an icon.
pub fn disabled(self, disabled: bool) -> Self
Sourcepub fn preview_state(self, state: InteractionPreview) -> Self
pub fn preview_state(self, state: InteractionPreview) -> Self
Render this tab as a static specimen in one forced interaction state.
A tab row holding a previewed tab is a specimen and leaves the tab
order. See InteractionPreview.
pub fn value(&self) -> &SharedString
pub fn label(&self) -> &SharedString
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TabItem
impl RefUnwindSafe for TabItem
impl Send for TabItem
impl Sync for TabItem
impl Unpin for TabItem
impl UnsafeUnpin for TabItem
impl UnwindSafe for TabItem
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
Converts
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> ⓘ
Converts
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