Skip to content
Myr

content.rs

This file

Path

serde_core/src/private/content.rs

39 lines · 750 bytes · Rust

Last changed by

Merge pull request #2976 from dtolnay/contentDavid Tolnaybefore adoptionfd4decf

History of this file

Take it

Merge pull request #2969 from dtolnay/coreprivateDavid Tolnaybefore adoption0990d97

lines 1–39why, one step back
1use crate::lib::*;
23// Used from generated code to buffer the contents of the Deserializer when4// deserializing untagged enums and internally tagged enums.5//6// Not public API. Use serde-value instead.7//8// Obsoleted by format-specific buffer types (https://github.com/serde-rs/serde/pull/2912).9#[doc(hidden)]10pub enum Content<'de> {11 Bool(bool),1213 U8(u8),14 U16(u16),15 U32(u32),16 U64(u64),1718 I8(i8),19 I16(i16),20 I32(i32),21 I64(i64),2223 F32(f32),24 F64(f64),2526 Char(char),27 String(String),28 Str(&'de str),29 ByteBuf(Vec<u8>),30 Bytes(&'de [u8]),3132 None,33 Some(Box<Content<'de>>),3435 Unit,36 Newtype(Box<Content<'de>>),37 Seq(Vec<Content<'de>>),38 Map(Vec<(Content<'de>, Content<'de>)>),39}