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§
Sourcefn attempt_count(&self) -> i32
fn attempt_count(&self) -> i32
Current delivery attempt count stored on the row before this dispatch attempt.
Sourcefn template_code(&self) -> &str
fn template_code(&self) -> &str
Stable product template code used for logs and audits.
Sourcefn to_address(&self) -> &str
fn to_address(&self) -> &str
Recipient address used for logs and audits.
Provided Methods§
Sourcefn dispatch_context(&self) -> MailOutboxDispatchContext
fn dispatch_context(&self) -> MailOutboxDispatchContext
Captures the small metadata set that remains useful after the concrete row is consumed.