pub struct StaticCodecVersion<const MAJOR: u64, const MINOR: u64, const PATCH: u64>;Expand description
Marker type that represents the semantic version of a codec.
The codec’s version can be decoupled from its implementation version to allow implementation changes that have no effect on the codec’s semantics or encoded representation.
StaticCodecVersions serialize transparently to their equivalent
Versions. On deserialization, the deserialized Version is checked
to be compatible (^) with the StaticCodecVersion, i.e. the
StaticCodecVersion must be of a the same or a newer compatible version.
Implementations§
Trait Implementations§
Source§impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> Clone for StaticCodecVersion<MAJOR, MINOR, PATCH>
impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> Clone for StaticCodecVersion<MAJOR, MINOR, PATCH>
Source§impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> Debug for StaticCodecVersion<MAJOR, MINOR, PATCH>
impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> Debug for StaticCodecVersion<MAJOR, MINOR, PATCH>
Source§impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> Default for StaticCodecVersion<MAJOR, MINOR, PATCH>
impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> Default for StaticCodecVersion<MAJOR, MINOR, PATCH>
Source§impl<'de, const MAJOR: u64, const MINOR: u64, const PATCH: u64> Deserialize<'de> for StaticCodecVersion<MAJOR, MINOR, PATCH>
impl<'de, const MAJOR: u64, const MINOR: u64, const PATCH: u64> Deserialize<'de> for StaticCodecVersion<MAJOR, MINOR, PATCH>
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> Display for StaticCodecVersion<MAJOR, MINOR, PATCH>
impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> Display for StaticCodecVersion<MAJOR, MINOR, PATCH>
Source§impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> JsonSchema for StaticCodecVersion<MAJOR, MINOR, PATCH>
impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> JsonSchema for StaticCodecVersion<MAJOR, MINOR, PATCH>
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(_gen: &mut SchemaGenerator) -> Schema
fn json_schema(_gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> Serialize for StaticCodecVersion<MAJOR, MINOR, PATCH>
impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> Serialize for StaticCodecVersion<MAJOR, MINOR, PATCH>
impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> Copy for StaticCodecVersion<MAJOR, MINOR, PATCH>
Auto Trait Implementations§
impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> Freeze for StaticCodecVersion<MAJOR, MINOR, PATCH>
impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> RefUnwindSafe for StaticCodecVersion<MAJOR, MINOR, PATCH>
impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> Send for StaticCodecVersion<MAJOR, MINOR, PATCH>
impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> Sync for StaticCodecVersion<MAJOR, MINOR, PATCH>
impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> Unpin for StaticCodecVersion<MAJOR, MINOR, PATCH>
impl<const MAJOR: u64, const MINOR: u64, const PATCH: u64> UnwindSafe for StaticCodecVersion<MAJOR, MINOR, PATCH>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more