pub struct WireSchemaCache { /* private fields */ }Expand description
A connection-scoped schema dictionary (one per direction per peer). A struct
schema (type name + field names) is transmitted ONCE and referenced thereafter —
the RPC-grade win for streams of same-shaped struct messages. The mode picks the
id scheme (see WireSchemaMode); every mode is corruption-free — a decoder that
cannot resolve a reference returns None rather than mis-decoding. An optional
keyframe interval re-emits a definition every k references so a late or lossy
receiver self-heals.
Implementations§
Source§impl WireSchemaCache
impl WireSchemaCache
Sourcepub fn content_addressed() -> Self
pub fn content_addressed() -> Self
Content-addressed (footgun-free): safe for multiple senders, reordering, loss.
Sourcepub fn sequential() -> Self
pub fn sequential() -> Self
Position ids (smallest): for a single reliable ordered point-to-point stream.
Sourcepub fn with_keyframe(self, k: u32) -> Self
pub fn with_keyframe(self, k: u32) -> Self
Re-emit a schema definition every k references, so a late/lossy receiver
self-heals (content-addressed mode).
Trait Implementations§
Source§impl Debug for WireSchemaCache
impl Debug for WireSchemaCache
Auto Trait Implementations§
impl Freeze for WireSchemaCache
impl RefUnwindSafe for WireSchemaCache
impl Send for WireSchemaCache
impl Sync for WireSchemaCache
impl Unpin for WireSchemaCache
impl UnsafeUnpin for WireSchemaCache
impl UnwindSafe for WireSchemaCache
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.