pub struct Notifier<R: Runtime> { /* private fields */ }Expand description
Thin wrapper over tauri-plugin-notification.
Fire-and-forget: errors are logged via log::warn! and never propagated.
Implementations§
Source§impl<R: Runtime> Notifier<R>
impl<R: Runtime> Notifier<R>
Sourcepub fn show(&self, title: &str, body: &str)
pub fn show(&self, title: &str, body: &str)
Show a local notification with the given title and body.
Errors are logged but not returned — callers should not need to handle notification failures.
Sourcepub fn show_with_id(&self, id: &str, title: &str, body: &str)
pub fn show_with_id(&self, id: &str, title: &str, body: &str)
Show a local notification with a stable string id.
Repeated notifications with the same id replace the previous one
instead of stacking (platform-dependent best effort). Same warn-only
contract as Notifier::show: errors are logged, never propagated.
Trait Implementations§
Auto Trait Implementations§
impl<R> !RefUnwindSafe for Notifier<R>
impl<R> !UnwindSafe for Notifier<R>
impl<R> Freeze for Notifier<R>
impl<R> Send for Notifier<R>
impl<R> Sync for Notifier<R>
impl<R> Unpin for Notifier<R>
impl<R> UnsafeUnpin for Notifier<R>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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