footing 0.5.4

Feature-gated foundations for Rust backend services
Documentation
//! In-process domain event dispatch.
//!
//! Applications use this module to publish domain events without coupling the
//! domain service to the side effects that may run afterwards. Handlers are
//! explicit, ordered, and local to the process; distributed delivery should use
//! an application outbox.
//!
//! ```rust
//! use footing::event::{DomainEvent, DomainEventDispatcher};
//!
//! # async fn example() -> Result<(), footing::event::DomainEventError> {
//! let dispatcher = DomainEventDispatcher::new();
//! let event = DomainEvent::new("user.created")?
//!     .with_subject("usr_01")?
//!     .with_metadata_value("source", "admin")?;
//!
//! dispatcher.publish(&event).await.unwrap();
//! # Ok(())
//! # }
//! ```

mod dispatcher;
mod model;

pub use dispatcher::{
    DomainEventDispatchError, DomainEventDispatchFailure, DomainEventDispatchSummary,
    DomainEventDispatcher, DomainEventFailurePolicy, DomainEventHandler,
};
pub use model::{DomainEvent, DomainEventError, MAX_EVENT_FIELD_LENGTH, MAX_EVENT_NAME_LENGTH};

#[cfg(test)]
mod tests;