Struct BannerProps
pub struct BannerProps {
pub title: String,
pub message: Option<String>,
pub kind: Option<BannerKind>,
pub icon: Option<Icon>,
pub action: Option<String>,
pub secondary_action: Option<String>,
pub act: Event,
pub secondary_act: Event,
pub dismiss: Event,
}Expand description
A message that stays in the page until it is resolved or dismissed: “You’re offline”, “This file changed on disk”, “Storage is almost full”. Its kind decides its glyph and colour; it carries a title, a message under it, up to two actions inside its box, and a dismiss button. It opens and closes in place, what follows moving with its edge.
Fields§
§title: StringWhat happened, in a short sentence.
message: Option<String>What it means or what to do, under the title.
kind: Option<BannerKind>What kind of message it is: neutral unless said. A warning or an error is announced at
once; the others when assistive technology is idle.
icon: Option<Icon>A glyph instead of the kind’s own.
action: Option<String>The label of its main action, at its trailing edge: “Retry”.
secondary_action: Option<String>The label of a second action, before the main one: “Details”.
act: EventIts main action was pressed.
secondary_act: EventIts second action was pressed.
dismiss: EventIts dismiss button was pressed: stop showing it. A banner with this has the button, and closes as it is pressed.
Trait Implementations§
§impl Component for BannerProps
impl Component for BannerProps
fn describe() -> Description
§fn from_source(source: &mut dyn Source) -> Result<BannerProps, Error>
fn from_source(source: &mut dyn Source) -> Result<BannerProps, Error>
source gives. Read more§impl Default for BannerProps
impl Default for BannerProps
§fn default() -> BannerProps
fn default() -> BannerProps
Auto Trait Implementations§
impl Freeze for BannerProps
impl !RefUnwindSafe for BannerProps
impl !Send for BannerProps
impl !Sync for BannerProps
impl Unpin for BannerProps
impl UnsafeUnpin for BannerProps
impl !UnwindSafe for BannerProps
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<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