Struct preserves_schema::gen::schema::Schema

source ·
pub struct Schema<_Value: NestedValue = IOValue> {
    pub definitions: Definitions<_Value>,
    pub embedded_type: EmbeddedTypeName,
    pub version: Version,
}

Fields§

§definitions: Definitions<_Value>§embedded_type: EmbeddedTypeName§version: Version

Implementations§

Trait Implementations§

source§

impl<_Value: Clone + NestedValue> Clone for Schema<_Value>

source§

fn clone(&self) -> Schema<_Value>

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<_Value: Debug + NestedValue> Debug for Schema<_Value>

source§

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

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

impl<_Value: NestedValue> Deserialize<_Value> for Schema<_Value>

source§

fn deserialize<'de, R: Reader<'de, _Value>>( r: &mut R ) -> Result<Self, ParseError>

source§

impl<_Value: NestedValue> Domain for Schema<_Value>

source§

fn debug_encode<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

source§

impl<_Value: Hash + NestedValue> Hash for Schema<_Value>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<_Value: Ord + NestedValue> Ord for Schema<_Value>

source§

fn cmp(&self, other: &Schema<_Value>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<'a, _L: Copy + Into<&'a Language<_Value>>, _Value: NestedValue + 'a> Parse<_L, _Value> for Schema<_Value>

source§

fn parse(_ctxt: _L, value: &_Value) -> Result<Self, ParseError>

Decode the given value (using auxiliary structure from the language instance) to produce an instance of Self.
source§

impl<_Value: PartialEq + NestedValue> PartialEq for Schema<_Value>

source§

fn eq(&self, other: &Schema<_Value>) -> 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<_Value: PartialOrd + NestedValue> PartialOrd for Schema<_Value>

source§

fn partial_cmp(&self, other: &Schema<_Value>) -> 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

This method 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

This method 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

This method 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

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

impl<'a, _L: Copy + Into<&'a Language<_Value>>, _Value: NestedValue + 'a> Unparse<_L, _Value> for Schema<_Value>

source§

fn unparse(&self, _ctxt: _L) -> _Value

Encode self into a Value (using auxiliary structure from the language instance).
source§

impl<_Value: Eq + NestedValue> Eq for Schema<_Value>

source§

impl<_Value: NestedValue> StructuralPartialEq for Schema<_Value>

Auto Trait Implementations§

§

impl<_Value> Freeze for Schema<_Value>

§

impl<_Value> RefUnwindSafe for Schema<_Value>
where _Value: RefUnwindSafe,

§

impl<_Value> Send for Schema<_Value>
where _Value: Send,

§

impl<_Value> Sync for Schema<_Value>
where _Value: Sync,

§

impl<_Value> Unpin for Schema<_Value>

§

impl<_Value> UnwindSafe for Schema<_Value>
where _Value: RefUnwindSafe,

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<L, N> Codec<N> for L
where N: NestedValue,

source§

fn parse<'a, T>(&'a self, value: &N) -> Result<T, ParseError>
where T: Parse<&'a L, N>,

Delegates to T::parse, using self as language and the given value as input.
source§

fn unparse<'a, T>(&'a self, value: &T) -> N
where T: Unparse<&'a L, N>,

Delegates to value.unparse, using self as language.
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, 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> Embeddable for T
where T: Domain + Clone,