pub struct SchemaValidator { /* private fields */ }Expand description
Schema validator that compiles and validates JSON Schema
Implementations§
Source§impl SchemaValidator
impl SchemaValidator
Sourcepub fn validate(&self, data: &Value) -> Result<(), ValidationError>
pub fn validate(&self, data: &Value) -> Result<(), ValidationError>
Validate JSON data against the schema
Sourcepub fn validate_json(&self, json_bytes: &[u8]) -> Result<Value, ValidationError>
pub fn validate_json(&self, json_bytes: &[u8]) -> Result<Value, ValidationError>
Validate and parse JSON bytes
Trait Implementations§
Source§impl Clone for SchemaValidator
impl Clone for SchemaValidator
Source§fn clone(&self) -> SchemaValidator
fn clone(&self) -> SchemaValidator
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 SchemaValidator
impl !RefUnwindSafe for SchemaValidator
impl Send for SchemaValidator
impl Sync for SchemaValidator
impl Unpin for SchemaValidator
impl !UnwindSafe for SchemaValidator
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