#[non_exhaustive]pub enum MailEvent {
Delivered {
message_id: String,
recipient: String,
},
Deferred {
message_id: String,
recipient: String,
attempt: u32,
},
Bounced {
message_id: String,
recipient: String,
code: u16,
reason: String,
},
Received {
message_id: String,
from: String,
mailbox: String,
},
}Expand description
A lifecycle event emitted by the engine.
Marked #[non_exhaustive]: new variants will appear as the engine grows,
and consumers must keep a catch-all arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Delivered
An outbound message was accepted by the remote server (250 to our
DATA). Responsibility has transferred.
Fields
Deferred
The remote server said “not now” (4xx). The message stays queued and will be retried with backoff — this is normal email behavior, not an error (greylisting relies on it).
Fields
Bounced
The remote server said “no, permanently” (5xx), or the queue lifetime
expired. A bounce is generated toward the envelope MAIL FROM.
Fields
Received
An inbound message was accepted and stored.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MailEvent
impl RefUnwindSafe for MailEvent
impl Send for MailEvent
impl Sync for MailEvent
impl Unpin for MailEvent
impl UnsafeUnpin for MailEvent
impl UnwindSafe for MailEvent
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