pub struct EmailNotifier<T: Transport + Send + Sync> { /* private fields */ }
Expand description
Implementation of email notifications via SMTP
Implementations§
Source§impl<T: Transport + Send + Sync> EmailNotifier<T>
impl<T: Transport + Send + Sync> EmailNotifier<T>
Sourcepub fn with_transport(email_content: EmailContent, transport: T) -> Self
pub fn with_transport(email_content: EmailContent, transport: T) -> Self
Source§impl EmailNotifier<SmtpTransport>
impl EmailNotifier<SmtpTransport>
Sourcepub fn new(
smtp_config: SmtpConfig,
email_content: EmailContent,
) -> Result<Self, Box<NotificationError>>
pub fn new( smtp_config: SmtpConfig, email_content: EmailContent, ) -> Result<Self, Box<NotificationError>>
Sourcepub fn markdown_to_html(md: &str) -> String
pub fn markdown_to_html(md: &str) -> String
Convert a Markdown string into HTML
Sourcepub fn from_config(config: &TriggerTypeConfig) -> Option<Self>
pub fn from_config(config: &TriggerTypeConfig) -> Option<Self>
Trait Implementations§
Source§impl<T: Transport + Send + Sync> Notifier for EmailNotifier<T>
impl<T: Transport + Send + Sync> Notifier for EmailNotifier<T>
Source§fn notify<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn notify<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn notify_with_payload<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 str,
_payload_fields: HashMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn notify_with_payload<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 str,
_payload_fields: HashMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sends a notification with custom payload fields Read more
Auto Trait Implementations§
impl<T> Freeze for EmailNotifier<T>where
T: Freeze,
impl<T> RefUnwindSafe for EmailNotifier<T>where
T: RefUnwindSafe,
impl<T> Send for EmailNotifier<T>
impl<T> Sync for EmailNotifier<T>
impl<T> Unpin for EmailNotifier<T>where
T: Unpin,
impl<T> UnwindSafe for EmailNotifier<T>where
T: 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
§impl<T> Chain<T> for T
impl<T> Chain<T> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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