nexcore_cargo/lib.rs
1//! # nexcore-cargo — Typed Transport for PV Rails
2//!
3//! Separates **cargo** (typed domain payload) from **freight** (conveyance protocol).
4//!
5//! In transportation: cargo refers to goods, freight refers to conveyance.
6//! In NexVigilant: cargo is PV domain data (signals, cases, assessments),
7//! freight is the MCP/microgram transport that moves it between stations.
8//!
9//! ## Core Concepts
10//!
11//! | Concept | Type | What It Does |
12//! |---------|------|-------------|
13//! | Cargo | `Cargo` trait | Typed payload with provenance, destination, perishability |
14//! | Provenance | `Provenance` | Where cargo originated (data source, query, confidence) |
15//! | Destination | `Destination` | What safety decision cargo moves toward |
16//! | Perishability | `Perishability` | Reporting deadline — the cold-chain temperature |
17//! | Station Stamp | `StationStamp` | Chain of custody record per processing hop |
18//! | Container | `Container<C>` | Transport wrapper with packing list |
19//! | Freight Route | `FreightRoute` | Planned path through stations (bill of lading) |
20//!
21//! ## Cold-Chain Principle
22//!
23//! Perishability can **upgrade** during transit but never downgrade. A routine
24//! FAERS query starts as `Periodic`. Signal detection upgrades it to `Prompt(90)`.
25//! Fatal causality assessment upgrades it to `Expedited(15)`. The cargo's urgency
26//! is discovered during transit, not known at loading.
27//!
28//! ## Layer Position
29//!
30//! Foundation layer — depends on `serde` only. Consumed by domain crates
31//! (`nexcore-vigilance`), orchestration (`nexcore-signal-pipeline`), and
32//! service (`nexcore-mcp`).
33
34#![forbid(unsafe_code)]
35#![warn(missing_docs)]
36#![cfg_attr(
37 not(test),
38 deny(clippy::unwrap_used, clippy::expect_used, clippy::panic)
39)]
40
41pub mod cargo;
42pub mod container;
43pub mod destination;
44pub mod perishability;
45pub mod provenance;
46pub mod route;
47pub mod stamp;
48
49// Re-export core types at crate root
50pub use cargo::{Cargo, SimpleCargo};
51pub use container::{Container, PackingList};
52pub use destination::Destination;
53pub use perishability::Perishability;
54pub use provenance::{DataSource, Provenance, QueryParams};
55pub use route::{FreightRoute, Priority, Waypoint};
56pub use stamp::{CustodyChain, StationStamp};