Enum vsmtp_common::transfer::Status
#[non_exhaustive]
pub enum Status {
Waiting {
timestamp: OffsetDateTime,
},
Sent {
timestamp: OffsetDateTime,
},
HeldBack {
errors: Vec<Error>,
},
Failed {
error: Error,
},
}Expand description
the delivery status of the email of the current rcpt.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Waiting
Fields
timestamp: OffsetDateTimetimestamp when the status has been set
the email has not been sent yet. the email is in the deliver / working queue at this point.
Sent
Fields
timestamp: OffsetDateTimetimestamp when the status has been set
email for this recipient has been successfully sent.
When all recipient are Status::Sent, the files are removed from disk.
HeldBack
the delivery failed, the system is trying to re-send the email. the email is located in the deferred queue at this point.
Failed
the email failed too many times. the argument is the reason of the failure. the email is probably written in the dead or quarantine queues at this point.
Implementations§
§impl Status
impl Status
pub const fn is_sendable(&self) -> bool
pub const fn is_sendable(&self) -> bool
Should the recipient be delivered, or it has been done already ?
pub fn held_back(&mut self, error: impl Into<Variant>)
pub fn held_back(&mut self, error: impl Into<Variant>)
Set the status to Status::HeldBack with an error, or increase the previous stack.