Enum serde_content::Found

source ·
pub enum Found {
Show 13 variants Unit, Bool(bool), Number(Number), Char(char), String(String), Bytes(Vec<u8>), Seq(Vec<Found>), Map(Vec<(Found, Found)>), Option(Option<Box<Found>>), Struct { name: String, data: Box<Data>, }, Enum { name: String, variant: String, data: Box<Data>, }, Tuple(Vec<Found>), Identifier(String),
}
Expand description

The type that was found.

Variants§

§

Unit

Found the Rust unit type, ().

§

Bool(bool)

Found a Rust boolean.

§

Number(Number)

Found any Rust number.

§

Char(char)

Found a Rust character.

§

String(String)

Found a Rust string.

§

Bytes(Vec<u8>)

Found a Rust byte array.

§

Seq(Vec<Found>)

Found an array of Rust values.

§

Map(Vec<(Found, Found)>)

Found a map of Rust values.

§

Option(Option<Box<Found>>)

Found optional Rust values.

§

Struct

Found a Rust struct.

Fields

§name: String

The name of the struct.

§data: Box<Data>

The data of the struct

§

Enum

Found a Rust enum.

Fields

§name: String

The name of the enum.

§variant: String

The variant of the enum.

§data: Box<Data>

The data of the enum.

§

Tuple(Vec<Found>)

Found a Rust tuple.

§

Identifier(String)

Found a struct field or an enum variant.

Trait Implementations§

source§

impl Clone for Found

source§

fn clone(&self) -> Found

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Found

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Found

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for Found

source§

fn eq(&self, other: &Found) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Found

source§

fn partial_cmp(&self, other: &Found) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for Found

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for Found

Auto Trait Implementations§

§

impl Freeze for Found

§

impl RefUnwindSafe for Found

§

impl Send for Found

§

impl Sync for Found

§

impl Unpin for Found

§

impl UnwindSafe for Found

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,