Skip to main content

WireCompatibility

Struct WireCompatibility 

Source
pub struct WireCompatibility;
Expand description

Canonical wire-schema compatibility window for this crate.

These constants are independent of crate semver. Bump them only according to the rules in CHANGELOG.md (when a wire-version bump is required).

Implementations§

Source§

impl WireCompatibility

Source

pub const CURRENT: u32 = 1

Schema version produced by this crate’s envelope encoders.

Source

pub const MIN_SUPPORTED: u32 = 1

Oldest schema version this crate still accepts.

Source

pub const LEGACY_UNVERSIONED: u32 = 1

Version assigned to pre-envelope IpcMessage JSON (no wire_version).

That encoding is the original serde-tagged enum. It remains supported for as long as LEGACY_UNVERSIONED stays inside [MIN_SUPPORTED, CURRENT].

Source

pub fn classify(version: u32) -> Compatibility

Classify version against MIN_SUPPORTED and CURRENT without decoding a payload.

Source

pub fn accept(version: u32) -> Result<SupportedWireVersion, CompatibilityError>

Accept version or return a typed, actionable error.

Call this before interpreting payload bytes.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.