pub enum Any<'de> {
Show 20 variants
Nil,
Bool(bool),
U8(u8),
U16(u16),
U32(u32),
U64(u64),
I8(i8),
I16(i16),
I32(i32),
I64(i64),
F32(f32),
F64(f64),
StrBorrowed(&'de str),
StrCopied(usize),
BinBorrowed(&'de [u8]),
BinCopied(usize),
Array(usize),
Map(usize),
ExtBorrowed {
type: i8,
data: &'de [u8],
},
ExtCopied {
type: i8,
len: usize,
},
}Expand description
Skip a single MessagePack value from the reader.
This reads and discards one complete value (including nested containers). Useful when encountering unknown map keys during decoding.
Variants§
Nil
Nil
Bool(bool)
true / false
U8(u8)
positive fixint / uint8
U16(u16)
uint16
U32(u32)
uint32
U64(u64)
uint64
I8(i8)
negative fixint / int8
I16(i16)
int16
I32(i32)
int32
I64(i64)
int64
F32(f32)
float32
F64(f64)
float64
StrBorrowed(&'de str)
fixstr / str8 / str16 / str32 (borrowed)
StrCopied(usize)
fixstr / str8 / str16 / str32 (copied)
BinBorrowed(&'de [u8])
bin8 / bin16 / bin32 (borrowed)
BinCopied(usize)
bin8 / bin16 / bin32 (copied)
Array(usize)
fixarray / array16 / array32
Map(usize)
fixmap / map16 / map32
ExtBorrowed
fixext1 / fixext2 / fixext4 / fixext8 / fixext16 / ext8 / ext16 / ext32 (borrowed)
ExtCopied
fixext1 / fixext2 / fixext4 / fixext8 / fixext16 / ext8 / ext16 / ext32 (copied)
Trait Implementations§
Source§impl<'de> DecodeBorrowed<'de> for Any<'de>
impl<'de> DecodeBorrowed<'de> for Any<'de>
Source§fn decode_borrowed_with_format<R>(
format: Format,
reader: &mut R,
) -> Result<<Self as DecodeBorrowed<'de>>::Value, Error<R::Error>>where
R: IoRead<'de>,
fn decode_borrowed_with_format<R>(
format: Format,
reader: &mut R,
) -> Result<<Self as DecodeBorrowed<'de>>::Value, Error<R::Error>>where
R: IoRead<'de>,
Decode with a previously read
Format.Source§fn decode_borrowed<R>(
reader: &mut R,
) -> Result<<Self as DecodeBorrowed<'de>>::Value, Error<R::Error>>where
R: IoRead<'de>,
fn decode_borrowed<R>(
reader: &mut R,
) -> Result<<Self as DecodeBorrowed<'de>>::Value, Error<R::Error>>where
R: IoRead<'de>,
Decode the next value.
impl<'de> Copy for Any<'de>
impl<'de> StructuralPartialEq for Any<'de>
Auto Trait Implementations§
impl<'de> Freeze for Any<'de>
impl<'de> RefUnwindSafe for Any<'de>
impl<'de> Send for Any<'de>
impl<'de> Sync for Any<'de>
impl<'de> Unpin for Any<'de>
impl<'de> UnsafeUnpin for Any<'de>
impl<'de> UnwindSafe for Any<'de>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'de, T> Decode<'de> for Twhere
T: DecodeBorrowed<'de> + 'de,
impl<'de, T> Decode<'de> for Twhere
T: DecodeBorrowed<'de> + 'de,
Source§type Value<'a> = <T as DecodeBorrowed<'de>>::Value
where
'de: 'a,
T: 'a
type Value<'a> = <T as DecodeBorrowed<'de>>::Value where 'de: 'a, T: 'a
The decoded value (may borrow for
'a).