Expand description
Pluggable QueueStore trait + an in-memory reference impl.
Storage abstractions for the outbound queue.
The bundled DeliveryWorker is currently
Postgres-only (enabled with the pg feature). This module defines the
traits a v1.x-compatible custom worker would target. External users who
don’t want sqlx can disable the pg feature, implement QueueStore
and Notifier against their own backend (sqlite, sled, custom REST,
in-memory for tests), and reuse the pure delivery primitives in this
crate (dkim_sign, dsn, mta_sts, retry) plus
mailrs-smtp-client.
Wider trait coverage and a generic worker are planned for a future minor release.
Structs§
- InMemory
Notifier - In-process notifier backed by
tokio::sync::Notify. - InMemory
Queue Store - Pure in-memory
QueueStorefor tests and single-process pilot deployments. Not durable across restarts. - Noop
Notifier - Notifier that drops every signal. The worker still polls on its configured interval, just without fast wake-ups. Useful when a real notifier hasn’t been wired up yet.
Enums§
- Store
Error - Error returned by store operations. Backend-specific details are stringified to keep the trait dyn-compatible across implementations.
Traits§
- Notifier
- Cross-process wake-up channel. The submitter calls
notifyafterenqueue; the worker awaitswaitto short-circuit its poll interval and pick up new work immediately. - Queue
Store - The persistent store the outbound queue lives in.