1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Effect integration for postmortem validation.
//!
//! This module provides Effect-based integration with stillwater for:
//! - Schema loading from filesystem
//! - Async validation with dependency injection
//! - Environment-based configuration
//!
//! # Feature Flag
//!
//! This module is only available when the `effect` feature is enabled.
//!
//! # Example
//!
//! ```rust,ignore
//! use postmortem::{SchemaRegistry, Schema};
//! use postmortem::effect::{SchemaEnv, FileSystem};
//! use stillwater::Effect;
//!
//! // Define your environment
//! struct AppEnv {
//! fs: MyFileSystem,
//! }
//!
//! impl SchemaEnv for AppEnv {
//! type Fs = MyFileSystem;
//! fn filesystem(&self) -> &Self::Fs { &self.fs }
//! }
//!
//! // Load schemas from directory
//! let registry = SchemaRegistry::new();
//! let load_effect = registry.load_dir("./schemas");
//! load_effect.run(&env)?;
//! ```
pub use ;
pub use ;