Skip to main content

smos_application/
lib.rs

1//! `smos-application` — port traits, transport types, and error hierarchy.
2//!
3//! This layer is intentionally IO-free in the same way `smos-domain` is: it
4//! only defines *what* the system does (port traits + DTOs) and *how it can
5//! fail* (errors). Concrete adapters (surreal store, HTTP upstream, Ollama
6//! provider, …) live in `smos`.
7//!
8//! The `helpers` module hosts protocol-shaped pure functions (HTTP/JSON/regex
9//! parsing) that build on top of the domain value objects. They are NOT domain
10//! concerns — the domain layer is restricted to entities and value objects.
11//!
12//! # Lint policy
13//!
14//! `async_fn_in_trait` is allowed workspace-wide for the port traits. The
15//! returned futures do not carry an explicit `Send` bound on the trait
16//! surface; concrete adapters are written to return `Send` futures, and use
17//! cases that need `Send` propagate the requirement via `T: Trait + Send +
18//! Sync + 'static` bounds at the spawn site.
19
20#![allow(async_fn_in_trait)]
21
22pub mod errors;
23pub mod helpers;
24pub mod ports;
25pub mod types;
26pub mod use_cases;
27
28pub use errors::UseCaseError;