pub struct UnraidNotifier<S, M>{ /* private fields */ }Expand description
The ‘UnraidNotifier’ struct is responsible for sending notifications.
The sender is the name displayed as by the unraid webgui.
Implementations§
Source§impl<S, M> UnraidNotifier<S, M>
impl<S, M> UnraidNotifier<S, M>
Sourcepub fn new(notify_cmd_path: S, sender: M) -> Result<Self, UnraidNotifierError>
pub fn new(notify_cmd_path: S, sender: M) -> Result<Self, UnraidNotifierError>
Sourcepub fn with_path<A: Into<S>>(self, path: A) -> Self
pub fn with_path<A: Into<S>>(self, path: A) -> Self
Consumes the notifier, and returns one with a new path.
Sourcepub fn with_sender<A: Into<M>>(self, sender: A) -> Self
pub fn with_sender<A: Into<M>>(self, sender: A) -> Self
Consumes the notifier, and returns one with a new sender.
Sourcepub fn modify_path<A: Into<S>>(
&mut self,
path: A,
) -> Result<(), UnraidNotifierError>
pub fn modify_path<A: Into<S>>( &mut self, path: A, ) -> Result<(), UnraidNotifierError>
Modifies the path of notifier.
§Errors
Returns an ‘UnraidNotifierError’ if the path verification fails.
Sourcepub fn modify_sender<A: Into<M>>(&mut self, sender: A)
pub fn modify_sender<A: Into<M>>(&mut self, sender: A)
Modifies the sender of the notifier.
Trait Implementations§
Source§impl<S, M> Clone for UnraidNotifier<S, M>
impl<S, M> Clone for UnraidNotifier<S, M>
Source§fn clone(&self) -> UnraidNotifier<S, M>
fn clone(&self) -> UnraidNotifier<S, M>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S, M> Debug for UnraidNotifier<S, M>
impl<S, M> Debug for UnraidNotifier<S, M>
Source§impl<S, M> Notifier<M> for UnraidNotifier<S, M>
impl<S, M> Notifier<M> for UnraidNotifier<S, M>
fn send( &self, message: M, level: NotificationLevel, ) -> Result<(), UnraidNotifierError>
Auto Trait Implementations§
impl<S, M> Freeze for UnraidNotifier<S, M>
impl<S, M> RefUnwindSafe for UnraidNotifier<S, M>where
S: RefUnwindSafe,
M: RefUnwindSafe,
impl<S, M> Send for UnraidNotifier<S, M>
impl<S, M> Sync for UnraidNotifier<S, M>
impl<S, M> Unpin for UnraidNotifier<S, M>
impl<S, M> UnwindSafe for UnraidNotifier<S, M>where
S: UnwindSafe,
M: UnwindSafe,
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