Skip to main content

Crate smos_application

Crate smos_application 

Source
Expand description

smos-application — port traits, transport types, and error hierarchy.

This layer is intentionally IO-free in the same way smos-domain is: it only defines what the system does (port traits + DTOs) and how it can fail (errors). Concrete adapters (surreal store, HTTP upstream, Ollama provider, …) live in smos.

The helpers module hosts protocol-shaped pure functions (HTTP/JSON/regex parsing) that build on top of the domain value objects. They are NOT domain concerns — the domain layer is restricted to entities and value objects.

§Lint policy

async_fn_in_trait is allowed workspace-wide for the port traits. The returned futures do not carry an explicit Send bound on the trait surface; concrete adapters are written to return Send futures, and use cases that need Send propagate the requirement via T: Trait + Send + Sync + 'static bounds at the spawn site.

Re-exports§

pub use errors::UseCaseError;

Modules§

errors
Error hierarchy at the application/adapter boundary.
helpers
Application-layer helpers — protocol-shaped pure functions.
ports
Port traits — abstract capabilities the application depends on.
types
Transport / DTO types used at port boundaries.
use_cases
Use cases — orchestrations over the port traits.