pub trait ApiVersion: 'static {
const ID: &'static str;
const IS_PREVIEW: bool = false;
}Expand description
The contract primitive traits, re-exported from the phoxal-bus crate (the
ABI floor) so they stay addressable at phoxal_api::ApiVersion /
phoxal_api::ContractBody.
ApiVersionis the marker trait identifying one dated API version (D60), implemented only by the zero-variantenum Api {}thatphoxal_api_tree!generates inside each version module; itsIDis the dated module name ("y2026_1") and is carried in bus metadata as informational provenance. ItsIS_PREVIEWconst is lifecycle metadata only.ContractBodyis a version-local wire body (D61): a plain serde type bound to exactly oneApiVersionand one contract family/topic. Every body declared inside aphoxal_api_tree!node gets a generated impl; handles,SetupContextbuilders, and theService/Driverderive assertions key off itsApi/FAMILY/SCHEMA_ID/TOPIC. Runtime decode compatibility keys offSCHEMA_ID; its serde encoding is the wire payload, with no version envelope (D62). Marker trait identifying one dated API version (D60).
Implemented only by the zero-variant enum Api {} that
phoxal_api_tree! generates inside each version module. The ID is the
dated module name ("y2026_1") and is carried in bus metadata as
informational provenance, never in the wire body or the topic key (D62).
IS_PREVIEW records authoring lifecycle only; it has no wire effect.
Required Associated Constants§
Provided Associated Constants§
Sourceconst IS_PREVIEW: bool = false
const IS_PREVIEW: bool = false
Whether this generated API version is still in the preview lifecycle.
This is control-plane metadata only. It is not encoded in bus payloads, topics, schema ids, or encoding strings.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".