lib.rs 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. //! Kuatia — async ledger resource built on top of [`kuatia_core`].
  2. //!
  3. //! This crate adds IO to the pure decision logic: the [`Store`](kuatia_storage::store::Store) trait
  4. //! abstracts storage, and the [`Ledger`](crate::ledger::Ledger) struct composes the three-phase
  5. //! commit pipeline (load → plan → apply) behind a convenient async API.
  6. pub mod error;
  7. pub mod inflight;
  8. pub mod ledger;
  9. pub mod saga;
  10. // Re-export storage crate for convenience.
  11. pub use kuatia_storage::{error as store_error, mem_store, store, store_tests};
  12. /// Common imports for building on the ledger.
  13. ///
  14. /// `use kuatia::prelude::*;` brings the domain types and intent builders from
  15. /// [`kuatia_core`] into scope, along with the [`Ledger`](crate::ledger::Ledger)
  16. /// resource, the [`Store`](kuatia_storage::store::Store) trait, and the
  17. /// [`InMemoryStore`](kuatia_storage::mem_store::InMemoryStore). Reach for the
  18. /// individual crates when you need types the prelude does not surface.
  19. pub mod prelude {
  20. pub use kuatia_core::*;
  21. pub use crate::error::LedgerError;
  22. pub use crate::inflight::{
  23. Authorization, InflightLeg, InflightLegStatus, InflightState, InflightStatus,
  24. };
  25. pub use crate::ledger::Ledger;
  26. pub use kuatia_storage::mem_store::InMemoryStore;
  27. pub use kuatia_storage::store::Store;
  28. }