#[non_exhaustive]pub enum TypeObject {
Minimal(MinimalTypeObject),
Complete(CompleteTypeObject),
}Expand description
TypeObject wrapper (Minimal or Complete).
Complete is significantly larger than Minimal (names + annotations
per XTypes 1.3 §7.3.1). The wire layout is spec-normative; boxing the
Complete variant would reroute ~20 constructor call sites without
real memory gain (TypeObject rarely lives on the hot path,
but in TypeLookup caches).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Minimal(MinimalTypeObject)
Minimal representation (hash-exact, nameless).
Complete(CompleteTypeObject)
Complete representation (with names + annotations).
Implementations§
Source§impl TypeObject
impl TypeObject
Sourcepub const fn discriminator(&self) -> u8
pub const fn discriminator(&self) -> u8
EquivalenceKind-Byte.
Sourcepub fn encode_into(&self, w: &mut BufferWriter) -> Result<(), EncodeError>
pub fn encode_into(&self, w: &mut BufferWriter) -> Result<(), EncodeError>
Sourcepub fn decode_from(r: &mut BufferReader<'_>) -> Result<Self, TypeCodecError>
pub fn decode_from(r: &mut BufferReader<'_>) -> Result<Self, TypeCodecError>
Sourcepub fn to_bytes_le(&self) -> Result<Vec<u8>, EncodeError>
pub fn to_bytes_le(&self) -> Result<Vec<u8>, EncodeError>
Sourcepub fn from_bytes_le(bytes: &[u8]) -> Result<Self, TypeCodecError>
pub fn from_bytes_le(bytes: &[u8]) -> Result<Self, TypeCodecError>
Trait Implementations§
Source§impl Clone for TypeObject
impl Clone for TypeObject
Source§fn clone(&self) -> TypeObject
fn clone(&self) -> TypeObject
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TypeObject
impl Debug for TypeObject
impl Eq for TypeObject
Source§impl PartialEq for TypeObject
impl PartialEq for TypeObject
Source§fn eq(&self, other: &TypeObject) -> bool
fn eq(&self, other: &TypeObject) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TypeObject
Auto Trait Implementations§
impl Freeze for TypeObject
impl RefUnwindSafe for TypeObject
impl Send for TypeObject
impl Sync for TypeObject
impl Unpin for TypeObject
impl UnsafeUnpin for TypeObject
impl UnwindSafe for TypeObject
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