pub enum Kind<Metadata: Default> {
Show 22 variants Struct { name: &'static str, children: Vec<Entry<Metadata>>, }, Aliased { name: &'static str, kind: Box<Descriptor<Metadata>>, }, Enum { name: &'static str, variants: Vec<Variant<Metadata>>, }, Sequence(Box<Descriptor<Metadata>>), Option(Box<Descriptor<Metadata>>), Mapping(Box<Descriptor<Metadata>>, Box<Descriptor<Metadata>>), DateTime, String, U128, I128, U64, I64, U32, I32, U16, I16, U8, I8, F64, F32, Bool, Any,
}
Expand description

Enum reflecting all supported types

Variants§

§

Struct

Fields

§name: &'static str

Name given to the struct in its declaration

§children: Vec<Entry<Metadata>>

List of fields within this struct

The type is a struct

§

Aliased

Fields

§name: &'static str

Name given to the struct in its declaration

§kind: Box<Descriptor<Metadata>>

The type this alias struct wraps

A struct wrapping a single anonymous field

§

Enum

Fields

§name: &'static str

Name given to the enum in its declaration

§variants: Vec<Variant<Metadata>>

Information about each variant value within this enum

A simple no-field enum type

§

Sequence(Box<Descriptor<Metadata>>)

A list of items of a consistent type

§

Option(Box<Descriptor<Metadata>>)

An item which is optionally present

§

Mapping(Box<Descriptor<Metadata>>, Box<Descriptor<Metadata>>)

A pairwise mapping between consistent types with unique keys

§

DateTime

A field describing a point in time

§

String

A string

§

U128

Unsigned 128 bit integer

§

I128

Signed 128 bit integer

§

U64

Unsigned 64 bit integer

§

I64

Signed 64 bit integer

§

U32

Unsigned 32 bit integer

§

I32

Signed 32 bit integer

§

U16

Unsigned 16 bit integer

§

I16

Signed 16 bit integer

§

U8

Unsigned 8 bit integer

§

I8

Signed 8 bit integer

§

F64

64 bit floating point number

§

F32

32 bit floating point number

§

Bool

A boolean value

§

Any

A value of unspecified type

Trait Implementations§

source§

impl<Metadata: Debug + Default> Debug for Kind<Metadata>

source§

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

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

impl<Metadata: PartialEq + Default> PartialEq for Kind<Metadata>

source§

fn eq(&self, other: &Kind<Metadata>) -> bool

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

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

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

impl<Metadata: Eq + Default> Eq for Kind<Metadata>

source§

impl<Metadata: Default> StructuralEq for Kind<Metadata>

source§

impl<Metadata: Default> StructuralPartialEq for Kind<Metadata>

Auto Trait Implementations§

§

impl<Metadata> RefUnwindSafe for Kind<Metadata>where Metadata: RefUnwindSafe,

§

impl<Metadata> Send for Kind<Metadata>where Metadata: Send,

§

impl<Metadata> Sync for Kind<Metadata>where Metadata: Sync,

§

impl<Metadata> Unpin for Kind<Metadata>where Metadata: Unpin,

§

impl<Metadata> UnwindSafe for Kind<Metadata>where Metadata: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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, U> TryFrom<U> for Twhere 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 Twhere 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.