Enum preserves_schema::gen::schema::SimplePattern

source ·
pub enum SimplePattern<_Value: NestedValue = IOValue> {
    Any,
    Atom {
        atom_kind: Box<AtomKind>,
    },
    Embedded {
        interface: Box<SimplePattern<_Value>>,
    },
    Lit {
        value: _Value,
    },
    Seqof {
        pattern: Box<SimplePattern<_Value>>,
    },
    Setof {
        pattern: Box<SimplePattern<_Value>>,
    },
    Dictof {
        key: Box<SimplePattern<_Value>>,
        value: Box<SimplePattern<_Value>>,
    },
    Ref(Box<Ref>),
}

Variants§

§

Any

§

Atom

Fields

§atom_kind: Box<AtomKind>
§

Embedded

Fields

§interface: Box<SimplePattern<_Value>>
§

Lit

Fields

§value: _Value
§

Seqof

Fields

§pattern: Box<SimplePattern<_Value>>
§

Setof

Fields

§pattern: Box<SimplePattern<_Value>>
§

Dictof

Fields

§key: Box<SimplePattern<_Value>>
§value: Box<SimplePattern<_Value>>
§

Ref(Box<Ref>)

Trait Implementations§

source§

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

source§

fn clone(&self) -> SimplePattern<_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 SimplePattern<_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 SimplePattern<_Value>

source§

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

source§

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

source§

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

source§

impl<_Value: Hash + NestedValue> Hash for SimplePattern<_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 SimplePattern<_Value>

source§

fn cmp(&self, other: &SimplePattern<_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 SimplePattern<_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 SimplePattern<_Value>

source§

fn eq(&self, other: &SimplePattern<_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 SimplePattern<_Value>

source§

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

source§

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

Auto Trait Implementations§

§

impl<_Value> Freeze for SimplePattern<_Value>
where _Value: Freeze,

§

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

§

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

§

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

§

impl<_Value> Unpin for SimplePattern<_Value>
where _Value: Unpin,

§

impl<_Value> UnwindSafe for SimplePattern<_Value>
where _Value: UnwindSafe,

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,