pub struct NotificationHandler { /* private fields */ }Implementations§
Source§impl NotificationHandler
impl NotificationHandler
pub fn new(channel: String) -> Self
pub fn _with_custom_server(server_url: String, channel: String) -> Self
pub async fn send(&self, notification: NotificationType) -> Result<(), Error>
pub async fn send_raw( &self, title: String, message: String, priority: NotificationPriority, tags: Vec<String>, ) -> Result<(), Error>
pub fn format_notification( &self, notification: NotificationType, ) -> (String, String, NotificationPriority, Vec<String>)
pub async fn send_attachment( &self, filename: String, title: String, message: String, body: Vec<u8>, tags: Vec<String>, ) -> Result<(), Error>
pub async fn _send_test(&self) -> Result<(), Error>
Auto Trait Implementations§
impl !RefUnwindSafe for NotificationHandler
impl !UnwindSafe for NotificationHandler
impl Forget for NotificationHandler
impl Freeze for NotificationHandler
impl Send for NotificationHandler
impl Sync for NotificationHandler
impl Unpin for NotificationHandler
impl UnsafeUnpin for NotificationHandler
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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