docs.rs failed to build stateset-core-0.7.4
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
stateset-core-0.7.0
stateset-core
Pure domain models and business logic for commerce applications. No I/O, no runtime dependencies — just the type system, validation, events, and repository traits you need to build commerce backends.
Part of the StateSet iCommerce engine.
What's Inside
- 35+ domain modules: orders, payments, inventory, customers, products, carts, returns, subscriptions, shipments, manufacturing, promotions, tax, analytics, and more
- State machines:
OrderStatus,PaymentTransactionStatus,SubscriptionStatuswith exhaustive match enforcement - Event sourcing:
CommerceEventenum with 30+ variants for full audit trails - Validation framework: Composable
ValidationBuilderwith pre-built validators for email, SKU, phone, postal code, price, quantity - Repository traits: Generic
Repository/AsyncRepositorywithauto_implfor&T,Box<T>,Arc<T> - Error taxonomy:
CommerceErrorwithis_not_found(),is_retryable(),suggested_status_code()and domain-specific sub-errors - Agent-to-agent commerce: A2A quotes, purchases, subscriptions, split payments, escrow
- Crypto primitives: x402 payment intents, ERC-8004 identity, Merkle proofs
Usage
use ;
use Customer;
use CommerceEvent;
use Validate;
// Domain models with type-safe state transitions
let order = default;
assert_eq!;
// All models implement Validate
let errors = order.validate;
// Events for audit trails
let event = OrderCreated ;
Feature Flags
embeddings— Enable vector embedding support (addsreqwest)metrics— Prometheus metrics (addsprometheus,once_cell)test-utils— Expose test helpers for downstream integration tests
License
MIT OR Apache-2.0