pub enum CompiledSchema {
Empty,
Type(JtdType),
Enum(Vec<String>),
Elements(Box<CompiledSchema>),
Values(Box<CompiledSchema>),
Properties {
required: Vec<(String, CompiledSchema)>,
optional: Vec<(String, CompiledSchema)>,
allow_extra: bool,
},
Discriminator {
tag: String,
mapping: Vec<(String, CompiledSchema)>,
},
Nullable(Box<CompiledSchema>),
}Expand description
Pre-compiled JTD schema for fast repeated validation.
Variants§
Empty
Type(JtdType)
Enum(Vec<String>)
Elements(Box<CompiledSchema>)
Values(Box<CompiledSchema>)
Properties
Discriminator
Nullable(Box<CompiledSchema>)
Trait Implementations§
Source§impl Clone for CompiledSchema
impl Clone for CompiledSchema
Source§fn clone(&self) -> CompiledSchema
fn clone(&self) -> CompiledSchema
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CompiledSchema
impl RefUnwindSafe for CompiledSchema
impl Send for CompiledSchema
impl Sync for CompiledSchema
impl Unpin for CompiledSchema
impl UnsafeUnpin for CompiledSchema
impl UnwindSafe for CompiledSchema
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more