pub enum Value {
Show 18 variants
Nothing,
Boolean(bool),
Int8(i8),
Int16(i16),
Int32(i32),
Int64(i64),
Int128(i128),
Int256([u8; 32]),
Uint8(u8),
Uint16(u16),
Uint32(u32),
Uint64(u64),
Double(f64),
Bytes(Vec<u8>),
Yson(Vec<u8>),
Variant {
tag: u16,
value: Box<Value>,
},
RepeatedVariants(Vec<Variant>),
Tuple(Vec<Value>),
}Expand description
A dynamically decoded Skiff value.
Every variant maps directly to one WireType. Compound values retain
tags and wire order so they can be re-encoded without a lossy conversion.
Variants§
Nothing
nothing, an empty payload.
Boolean(bool)
boolean.
Int8(i8)
int8.
Int16(i16)
int16.
Int32(i32)
int32.
Int64(i64)
int64.
Int128(i128)
int128.
Int256([u8; 32])
int256, kept as its little-endian two’s-complement bytes.
Uint8(u8)
uint8.
Uint16(u16)
uint16.
Uint32(u32)
uint32.
Uint64(u64)
uint64.
Double(f64)
double.
Bytes(Vec<u8>)
string32, which may contain non-UTF-8 bytes.
Yson(Vec<u8>)
yson32, kept as one binary-YSON payload.
Variant
A variant8 or variant16 child selected by tag.
RepeatedVariants(Vec<Variant>)
A repeated_variant8 or repeated_variant16 sequence.
Tuple(Vec<Value>)
A tuple, in schema-child order.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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