Skip to main content

ApiVersion

Trait ApiVersion 

Source
pub trait ApiVersion: 'static {
    const ID: &'static str;
}
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.

  • ApiVersion is the marker trait identifying one API version (D60), implemented only by the zero-variant enum Api {} that phoxal_api_tree! generates inside each revision module; its ID is the concrete dotted wire identity (for example "v0.1").
  • ContractBody is a version-local wire body (D61): a plain serde type bound to exactly one ApiVersion and one contract topic. Every body declared inside a phoxal_api_tree! node gets a generated impl; handles, SetupContext builders, and the Service/Driver derive assertions key off its Api/TOPIC. TOPIC is version-qualified (D1) and is the compatibility key; its serde encoding is the wire payload, with no version envelope (D62). Marker trait identifying one API version (D60).

Implemented only by the zero-variant enum Api {} that phoxal_api_tree! generates inside each revision module. The ID is the dotted wire revision ("v0.1") and is carried in bus metadata as informational provenance, never in the wire body or the topic key (D62).

Required Associated Constants§

Source

const ID: &'static str

The dotted wire-revision identifier, e.g. "v0.1" (the corresponding Rust module is v0_1).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl ApiVersion for Api

Source§

const ID: &'static str = "v0.1"