Skip to main content

phoxal_api/
lib.rs

1//! Versioned robot-domain payloads and their semantic endpoints.
2//!
3//! Payload structs, enums, implementations, and tests are ordinary Rust items
4//! in version-first modules. A sibling [`phoxal_api_fragment!`] declares only
5//! that module's endpoints. Payloads own serde shape, construction invariants,
6//! and domain behavior; they do not know their topic or delivery policy.
7//! [`phoxal_api_tree!`] materializes deterministic descriptors and typed topic
8//! builders, then re-exports the authored payloads through each revision.
9//!
10//! Normal robot participants use the train-selected [`latest`] facade
11//! (reexported as `phoxal::api`). This pre-v1 train currently has one maintained
12//! concrete revision, [`v0_1`]. Every materialized revision is complete and
13//! independent at runtime: inheritance exists only in macro authoring.
14//!
15//! Endpoint semantics are fixed by the declaration: `State`, `Sample`, `Event`,
16//! `Stream`, `Setpoint`, or bounded query. Source identity, robot/capture time,
17//! ordered positions, loss, gaps, and terminal evidence remain bus metadata and
18//! never become generated fields in a domain payload.
19//!
20//! This crate contains robot contracts only. Runtime/simulation infrastructure
21//! and supervisor process protocols have separate owners.
22
23mod api;
24pub use api::generated::*;
25pub use phoxal_macros::{phoxal_api_fragment, phoxal_api_fragment_group, phoxal_api_tree};