pub enum ValueDecodeSpec {
Unit,
Scalar(Scalar),
String,
Bytes,
Record {
shape: RecordShape,
fields: &'static [ValueDecodeField],
},
Array {
element: ValueDecodeRef,
len: usize,
},
Sequence {
element: ValueDecodeRef,
count: Scalar,
capacity: Option<usize>,
},
Map {
key: ValueDecodeRef,
value: ValueDecodeRef,
},
Option(ValueDecodeRef),
Delegate(ValueDecodeRef),
Enum {
tag: Scalar,
variants: &'static [ValueDecodeVariant],
},
}Expand description
Wire operations supported by the first self-description API.
Variants§
Unit
No bytes.
Scalar(Scalar)
One native scalar.
String
UTF-8 bytes prefixed by a codec-encoded u64 length.
Bytes
Raw bytes prefixed by a codec-encoded u64 length.
Record
Fields concatenated in wire order.
Fields
§
shape: RecordShapeLogical shape.
§
fields: &'static [ValueDecodeField]Encoded fields in wire order.
Array
Fixed repeat, without a count prefix.
Sequence
Count-prefixed repeat; capacity is checked by the offline decoder.
Fields
§
element: ValueDecodeRefChild representation.
Map
Count-prefixed key/value pairs.
Option(ValueDecodeRef)
One-byte presence tag followed by an optional child.
Delegate(ValueDecodeRef)
Transparent indirection retaining the child’s original type binding.
Enum
Integer tag followed by the selected branch.
Trait Implementations§
Source§impl Clone for ValueDecodeSpec
impl Clone for ValueDecodeSpec
impl Copy for ValueDecodeSpec
Auto Trait Implementations§
impl Freeze for ValueDecodeSpec
impl RefUnwindSafe for ValueDecodeSpec
impl Send for ValueDecodeSpec
impl Sync for ValueDecodeSpec
impl Unpin for ValueDecodeSpec
impl UnsafeUnpin for ValueDecodeSpec
impl UnwindSafe for ValueDecodeSpec
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