pub enum WireSchemaMode {
Off,
Sequential,
ContentAddressed,
}Expand description
How a connection-scoped schema dictionary identifies a struct schema on the wire. All modes are corruption-free; they trade size against robustness.
Variants§
Off
No dictionary — the schema is always inline (T_STRUCTS). Always safe.
Sequential
Position ids: a 1-byte counter. The smallest, but the id only means anything relative to ONE sender’s ordered stream — use only for a reliable point-to-point connection (one sender per receiver cache).
ContentAddressed
Content-addressed: the id is a 64-bit fingerprint of the schema itself, so it
is sender-independent and order-independent. Multiple senders, reordering, and
loss are all safe (a reference to an unknown fingerprint resolves to None,
never to the wrong schema; a definition whose fingerprint conflicts with a
different cached schema is rejected). The footgun-free default for a mesh.
Trait Implementations§
Source§impl Clone for WireSchemaMode
impl Clone for WireSchemaMode
Source§fn clone(&self) -> WireSchemaMode
fn clone(&self) -> WireSchemaMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WireSchemaMode
impl Debug for WireSchemaMode
Source§impl Default for WireSchemaMode
impl Default for WireSchemaMode
Source§fn default() -> WireSchemaMode
fn default() -> WireSchemaMode
Source§impl PartialEq for WireSchemaMode
impl PartialEq for WireSchemaMode
Source§fn eq(&self, other: &WireSchemaMode) -> bool
fn eq(&self, other: &WireSchemaMode) -> bool
self and other values to be equal, and is used by ==.impl Copy for WireSchemaMode
impl Eq for WireSchemaMode
impl StructuralPartialEq for WireSchemaMode
Auto Trait Implementations§
impl Freeze for WireSchemaMode
impl RefUnwindSafe for WireSchemaMode
impl Send for WireSchemaMode
impl Sync for WireSchemaMode
impl Unpin for WireSchemaMode
impl UnsafeUnpin for WireSchemaMode
impl UnwindSafe for WireSchemaMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.