pub(crate) enum Content<'de> {
Show 24 variants
Bool(bool),
U8(u8),
U16(u16),
U32(u32),
U64(u64),
U128(u128),
I8(i8),
I16(i16),
I32(i32),
I64(i64),
I128(i128),
F32(f32),
F64(f64),
Char(char),
String(String),
Str(&'de str),
ByteBuf(Vec<u8>),
Bytes(&'de [u8]),
None,
Some(Box<Content<'de>>),
Unit,
Newtype(Box<Content<'de>>),
Seq(Vec<Content<'de>>),
Map(Vec<(Content<'de>, Content<'de>)>),
}Expand description
Used from generated code to buffer the contents of the Deserializer when deserializing untagged enums and internally tagged enums.
Not public API. Use serde-value instead.
Variants§
Bool(bool)
U8(u8)
U16(u16)
U32(u32)
U64(u64)
U128(u128)
I8(i8)
I16(i16)
I32(i32)
I64(i64)
I128(i128)
F32(f32)
F64(f64)
Char(char)
String(String)
Str(&'de str)
ByteBuf(Vec<u8>)
Bytes(&'de [u8])
None
Some(Box<Content<'de>>)
Unit
Newtype(Box<Content<'de>>)
Seq(Vec<Content<'de>>)
Map(Vec<(Content<'de>, Content<'de>)>)
Implementations§
Source§impl Content<'_>
impl Content<'_>
fn unexpected<'a>(&'a self, buf: &'a mut [u8; 58]) -> Unexpected<'a>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Content<'de>
impl<'de> Deserialize<'de> for Content<'de>
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'de> Freeze for Content<'de>
impl<'de> RefUnwindSafe for Content<'de>
impl<'de> Send for Content<'de>
impl<'de> Sync for Content<'de>
impl<'de> Unpin for Content<'de>
impl<'de> UnsafeUnpin for Content<'de>
impl<'de> UnwindSafe for Content<'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