Trait preserves_schema::support::Parse

source ·
pub trait Parse<L, Value: NestedValue>: Sized {
    // Required method
    fn parse(language: L, value: &Value) -> Result<Self, ParseError>;
}
Expand description

Implementors of Parse can produce instances of themselves from a Value, given a supporting language. All Schema-compiler-produced types implement Parse.

Required Methods§

source

fn parse(language: L, value: &Value) -> Result<Self, ParseError>

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

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a, T: NestedValueCodec, Value: NestedValue> Parse<&'a T, Value> for Value

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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