pub struct BreadcrumbItem { /* private fields */ }Expand description
A single breadcrumb segment definition.
Implementations§
Source§impl BreadcrumbItem
impl BreadcrumbItem
Sourcepub fn new(label: impl Into<LocalizedString>) -> Self
pub fn new(label: impl Into<LocalizedString>) -> Self
Construct a non-current (navigable) breadcrumb segment.
Sourcepub fn current(label: impl Into<LocalizedString>) -> Self
pub fn current(label: impl Into<LocalizedString>) -> Self
Construct the current (last) breadcrumb segment, announced
with aria-current="page". Current segments are never
collapsed into the overflow … menu.
Sourcepub fn on_activate_fn(self, f: impl Fn(&mut EventContext<'_>) + 'static) -> Self
pub fn on_activate_fn(self, f: impl Fn(&mut EventContext<'_>) + 'static) -> Self
Closure invoked on activation.
Sourcepub fn tooltip(self, text: impl Into<LocalizedString>) -> Self
pub fn tooltip(self, text: impl Into<LocalizedString>) -> Self
Attach a plain single-line tooltip to this breadcrumb segment, shown after a hover delay. Clears any previously set rich or composite tooltip.
Sourcepub fn rich_tooltip(self, key: impl Into<String>) -> Self
pub fn rich_tooltip(self, key: impl Into<String>) -> Self
Attach a rich tooltip to this breadcrumb segment, looked up by registry key. Clears any previously set plain or composite tooltip.
Sourcepub fn rich_tooltip_content(self, content: TooltipContent) -> Self
pub fn rich_tooltip_content(self, content: TooltipContent) -> Self
Attach a rich tooltip to this breadcrumb segment from inline content. Clears any previously set plain or composite tooltip.
Sourcepub fn composite_tooltip(self, content: impl Widget + 'static) -> Self
pub fn composite_tooltip(self, content: impl Widget + 'static) -> Self
Attach a composite tooltip (arbitrary widget tree) to this breadcrumb segment. Clears any previously set plain or rich tooltip.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BreadcrumbItem
impl !Send for BreadcrumbItem
impl !Sync for BreadcrumbItem
impl !UnwindSafe for BreadcrumbItem
impl Freeze for BreadcrumbItem
impl Unpin for BreadcrumbItem
impl UnsafeUnpin for BreadcrumbItem
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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> ErasedDestructor for Twhere
T: 'static,
§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