pub struct Notification { /* private fields */ }Expand description
One thing that happened, whether or not a toast ever showed it.
The severity is the library’s existing Tone vocabulary rather than a
second severity scale, so a notification reads the same in the centre as
the toast of it read on screen.
Implementations§
Source§impl Notification
impl Notification
pub fn new(ident: impl Into<Ident>, message: impl Into<SharedString>) -> Self
pub fn tone(self, tone: Tone) -> Self
pub fn detail(self, detail: impl Into<SharedString>) -> Self
Sourcepub fn at(self, at: impl Into<SharedString>) -> Self
pub fn at(self, at: impl Into<SharedString>) -> Self
When it happened, already worded by the host.
Sourcepub fn read(self, read: bool) -> Self
pub fn read(self, read: bool) -> Self
Files it as already read, for a report the typist has plainly seen.
Sourcepub fn action(
self,
label: impl Into<SharedString>,
handler: impl Fn(&mut Window, &mut App) + 'static,
) -> Self
pub fn action( self, label: impl Into<SharedString>, handler: impl Fn(&mut Window, &mut App) + 'static, ) -> Self
The one thing that can be done about it, as on a toast.
pub fn id(&self) -> SharedString
pub fn is_read(&self) -> bool
pub fn message(&self) -> &SharedString
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Notification
impl !Send for Notification
impl !Sync for Notification
impl !UnwindSafe for Notification
impl Freeze for Notification
impl Unpin for Notification
impl UnsafeUnpin for Notification
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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