Struct serde_content::Enum
source · pub struct Enum<'a> {
pub name: Cow<'static, str>,
pub variant_index: u32,
pub variant: Cow<'static, str>,
pub data: Data<'a>,
}
Expand description
Represents a Rust enum.
Fields§
§name: Cow<'static, str>
The name of the enum.
variant_index: u32
The index of the enum variant.
variant: Cow<'static, str>
The name of the enum variant.
data: Data<'a>
The data of the enum.
Implementations§
Trait Implementations§
source§impl<'de> IntoDeserializer<'de, Error> for Enum<'de>
impl<'de> IntoDeserializer<'de, Error> for Enum<'de>
§type Deserializer = Deserializer<'de>
type Deserializer = Deserializer<'de>
The type of the deserializer being converted into.
source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
source§impl<'a> PartialOrd for Enum<'a>
impl<'a> PartialOrd for Enum<'a>
source§impl Unexpected for Box<Enum<'_>>
impl Unexpected for Box<Enum<'_>>
source§fn unexpected(self, expected: Expected) -> Error
fn unexpected(self, expected: Expected) -> Error
Consumes the type and returns an error.
impl<'a> StructuralPartialEq for Enum<'a>
Auto Trait Implementations§
impl<'a> Freeze for Enum<'a>
impl<'a> RefUnwindSafe for Enum<'a>
impl<'a> Send for Enum<'a>
impl<'a> Sync for Enum<'a>
impl<'a> Unpin for Enum<'a>
impl<'a> UnwindSafe for Enum<'a>
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)