pub struct Validator { /* private fields */ }Expand description
A compiled schema.
Implementations§
Source§impl Validator
impl Validator
Sourcepub fn new(schema: &Value) -> Result<Self, SchemaError>
pub fn new(schema: &Value) -> Result<Self, SchemaError>
Compile a draft 2020-12 schema that keeps to
params::KEYWORDS.
§Errors
Returns where the schema is not one, or uses a keyword outside that set.
Auto Trait Implementations§
impl Freeze for Validator
impl RefUnwindSafe for Validator
impl Send for Validator
impl Sync for Validator
impl Unpin for Validator
impl UnsafeUnpin for Validator
impl UnwindSafe for Validator
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