pub struct SendMail {
pub message: Message,
}Expand description
The job that renders and delivers a queued message.
Fields§
§message: MessageTrait Implementations§
Source§impl<'de> Deserialize<'de> for SendMail
impl<'de> Deserialize<'de> for SendMail
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Job for SendMail
impl Job for SendMail
Source§fn run<'life0, 'life1, 'async_trait>(
&'life0 self,
_cx: &'life1 JobCx,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn run<'life0, 'life1, 'async_trait>(
&'life0 self,
_cx: &'life1 JobCx,
) -> Pin<Box<dyn Future<Output = Result<(), JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Never called: the handler Mail::job_reg builds runs it, since it
needs the mail service.
Source§const NAME: &'static str = "laterite.mail::send"
const NAME: &'static str = "laterite.mail::send"
The job’s name, unique across the application:
acme.blog::send_digest.Source§fn tries(&self) -> u32
fn tries(&self) -> u32
How many attempts before the job fails;
0 means as many as the
retry window allows. Three unless overridden.Source§fn backoff(&self, attempt: u32) -> Duration
fn backoff(&self, attempt: u32) -> Duration
How long to wait before attempt
attempt + 1, after attempt
attempt failed. Ten seconds, doubling each time, unless overridden.Source§fn queue(&self) -> String
fn queue(&self) -> String
The queue the job lands on.
DEFAULT_QUEUE unless overridden.Source§fn timeout(&self) -> Option<Duration>
fn timeout(&self) -> Option<Duration>
How long one attempt may run. A minute unless overridden;
None
means no limit.Source§fn retry_until(&self) -> Option<DateTime<Utc>>
fn retry_until(&self) -> Option<DateTime<Utc>>
Keep retrying until this moment, whatever
tries says. None
unless overridden.Source§fn unique_key(&self) -> Option<String>
fn unique_key(&self) -> Option<String>
A key no two pending jobs may share: a push while one with the same
key waits is dropped.
None unless overridden.Auto Trait Implementations§
impl Freeze for SendMail
impl RefUnwindSafe for SendMail
impl Send for SendMail
impl Sync for SendMail
impl Unpin for SendMail
impl UnsafeUnpin for SendMail
impl UnwindSafe for SendMail
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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