Skip to main content

mail_outbox_component

Function mail_outbox_component 

Source
pub fn mail_outbox_component<T, F, Fut>(
    resources: T,
    drain: F,
) -> RuntimeComponentBundleRegistration<ShutdownResourceComponent<T>>
where T: Send + 'static, F: FnOnce(T) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<(), String>> + Send + 'static,
Expand description

Creates the mail outbox runtime component used by product entrypoints.

The resources value is product-defined. It usually contains a database handle, runtime config snapshot, and mail sender. The drain callback keeps product-specific rendering, repository, audit, and error mapping outside Forge while still using the shared component lifecycle.