Skip to main content

Schema

Enum Schema 

Source
pub enum Schema {
    Primitive(Primitive),
    Dict(Dict),
    List(List),
    Set(Set),
    FrozenSet(FrozenSet),
    Tuple(Tuple),
    Class(Class),
    Enum(Enum),
    Optional(Optional),
    Union(Union),
    Any(Any),
}

Variants§

§

Primitive(Primitive)

§

Dict(Dict)

§

List(List)

§

Set(Set)

§

FrozenSet(FrozenSet)

§

Tuple(Tuple)

§

Class(Class)

§

Enum(Enum)

§

Optional(Optional)

§

Union(Union)

§

Any(Any)

Implementations§

Source§

impl Schema

Source

pub fn new_primitive(f0: Primitive) -> Self

Constructs a new Schema::Primitive.

Source§

impl Schema

Source

pub fn new_dict(f0: Dict) -> Self

Constructs a new Schema::Dict.

Source§

impl Schema

Source

pub fn new_list(f0: List) -> Self

Constructs a new Schema::List.

Source§

impl Schema

Source

pub fn new_set(f0: Set) -> Self

Constructs a new Schema::Set.

Source§

impl Schema

Source

pub fn new_frozen_set(f0: FrozenSet) -> Self

Constructs a new Schema::FrozenSet.

Source§

impl Schema

Source

pub fn new_tuple(f0: Tuple) -> Self

Constructs a new Schema::Tuple.

Source§

impl Schema

Source

pub fn new_class(f0: Class) -> Self

Constructs a new Schema::Class.

Source§

impl Schema

Source

pub fn new_enum(f0: Enum) -> Self

Constructs a new Schema::Enum.

Source§

impl Schema

Source

pub fn new_optional(f0: Optional) -> Self

Constructs a new Schema::Optional.

Source§

impl Schema

Source

pub fn new_union(f0: Union) -> Self

Constructs a new Schema::Union.

Source§

impl Schema

Source

pub fn new_any(f0: Any) -> Self

Constructs a new Schema::Any.

Source§

impl Schema

Source

pub fn name(&self) -> &str

Trait Implementations§

Source§

impl Clone for Schema

Source§

fn clone(&self) -> Schema

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Schema

Source§

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

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

impl<'a, 'de> DeserializeSeed<'de> for &'a Schema

Source§

type Value = Object

The type produced by using this seed.
Source§

fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>
where D: Deserializer<'de>,

Equivalent to the more common Deserialize::deserialize method, except with some initial piece of data (the seed) passed in.
Source§

impl Eq for Schema

Source§

impl PartialEq for Schema

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Schema

Auto Trait Implementations§

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§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

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

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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,

Source§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.