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
impl WireCompatibility
Sourcepub const MIN_SUPPORTED: u32 = 1
pub const MIN_SUPPORTED: u32 = 1
Oldest schema version this crate still accepts.
Sourcepub const LEGACY_UNVERSIONED: u32 = 1
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].
Sourcepub fn classify(version: u32) -> Compatibility
pub fn classify(version: u32) -> Compatibility
Classify version against MIN_SUPPORTED and
CURRENT without decoding a payload.
Sourcepub fn accept(version: u32) -> Result<SupportedWireVersion, CompatibilityError>
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§
impl Freeze for WireCompatibility
impl RefUnwindSafe for WireCompatibility
impl Send for WireCompatibility
impl Sync for WireCompatibility
impl Unpin for WireCompatibility
impl UnsafeUnpin for WireCompatibility
impl UnwindSafe for WireCompatibility
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