Skip to main content

Schema

Trait Schema 

Source
pub trait Schema: Sized {
    const UNKNOWN_FIELDS: Option<UnknownFields> = None;

    // Required methods
    fn decode<V>(
        values: &V,
        options: DecodeOptions,
    ) -> Result<Self, ValidationErrors>
       where V: Values;
    fn metadata() -> SchemaMetadata;
}

Provided Associated Constants§

Required Methods§

Source

fn decode<V>( values: &V, options: DecodeOptions, ) -> Result<Self, ValidationErrors>
where V: Values,

Source

fn metadata() -> SchemaMetadata

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> Schema for T
where T: ValueSchema,