pub struct Notifier<T: Trigger> { }
Expand description
Represents a notifier for sending notifications.
§Type Parameters
T - The trigger type implementing the Trigger trait.
Creates a new Notifier instance.
§Arguments
notifier - An Arc of a notification::Notifier.
§Returns
A new Notifier instance.
§Errors
Returns an error if the notifier cannot be initialized.
Sends a notification for a given trigger.
§Arguments
trigger - The trigger to notify.
§Returns
Ok(()) on success.
§Errors
Returns an error if the trigger value is zero or the notification fails.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
[From]<T> for U chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.