Struct jsonschema::JSONSchema [−][src]
pub struct JSONSchema<'a> { /* fields omitted */ }
Expand description
The structure that holds a JSON Schema compiled into a validation tree
Implementations
Return a default CompilationOptions
that can configure
JSONSchema
compilaton flow.
Using options you will be able to configure the draft version
to use during JSONSchema
compilation
Example of usage:
let maybe_jsonschema: Result<JSONSchema, _> = JSONSchema::options() .with_draft(Draft::Draft7) .compile(&schema);
Compile the input schema into a validation tree.
The method is equivalent to JSONSchema::options().compile(schema)
Run validation against instance
and return an iterator over ValidationError
in the error case.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for JSONSchema<'a>
impl<'a> Send for JSONSchema<'a>
impl<'a> Sync for JSONSchema<'a>
impl<'a> Unpin for JSONSchema<'a>
impl<'a> !UnwindSafe for JSONSchema<'a>