Skip to main content

MailOutboxDispatchRow

Trait MailOutboxDispatchRow 

Source
pub trait MailOutboxDispatchRow {
    // Required methods
    fn id(&self) -> i64;
    fn attempt_count(&self) -> i32;
    fn template_code(&self) -> &str;
    fn to_address(&self) -> &str;

    // Provided methods
    fn to_name(&self) -> Option<&str> { ... }
    fn dispatch_context(&self) -> MailOutboxDispatchContext { ... }
}
Expand description

Minimal row metadata needed by the shared outbox dispatcher.

Product crates keep their concrete database model and implement this trait on it so Forge can log and apply retry policy without knowing SeaORM entities or product-specific columns.

Required Methods§

Source

fn id(&self) -> i64

Stable row id.

Source

fn attempt_count(&self) -> i32

Current delivery attempt count stored on the row before this dispatch attempt.

Source

fn template_code(&self) -> &str

Stable product template code used for logs and audits.

Source

fn to_address(&self) -> &str

Recipient address used for logs and audits.

Provided Methods§

Source

fn to_name(&self) -> Option<&str>

Optional recipient display name used for audit records.

Source

fn dispatch_context(&self) -> MailOutboxDispatchContext

Captures the small metadata set that remains useful after the concrete row is consumed.

Implementors§