Expand description
PJS Domain Layer - Pure Business Logic
This crate contains the pure domain logic for PJS (Priority JSON Streaming Protocol) with ZERO external dependencies (except thiserror for error handling).
The domain layer is WASM-compatible and can be used in both native and WebAssembly environments.
§Architecture
Following Clean Architecture principles:
- Value Objects: Immutable, validated domain concepts (Priority, JsonPath, etc.)
- Entities: Domain objects with identity (Frame, Stream)
- Domain Events: State change notifications
§Features
std(default): Standard library supportserde: Serialization support for WASM interopwasm: Enables WASM-specific optimizations
Re-exports§
pub use entities::Frame;pub use entities::Stream;pub use events::DomainEvent;pub use events::SessionState;pub use value_objects::JsonData;pub use value_objects::JsonPath;pub use value_objects::Priority;pub use value_objects::Schema;pub use value_objects::SessionId;pub use value_objects::StreamId;
Modules§
- entities
- Domain entities with business logic and invariants
- events
- Domain events for event sourcing and integration
- value_
objects - Domain Value Objects
Enums§
- Domain
Error - Domain-specific errors
Type Aliases§
- Domain
Result - Domain Result type