pub struct SchemaValidator { /* private fields */ }Expand description
Schema validator for YAML documents
Implementations§
Source§impl SchemaValidator
impl SchemaValidator
Sourcepub fn custom(schema: CustomSchema) -> Self
pub fn custom(schema: CustomSchema) -> Self
Create a validator for a custom schema
Sourcepub fn validate(&self, document: &Document) -> ValidationResult<()>
pub fn validate(&self, document: &Document) -> ValidationResult<()>
Validate a YAML document against the schema
Sourcepub fn can_coerce(&self, document: &Document) -> ValidationResult<()>
pub fn can_coerce(&self, document: &Document) -> ValidationResult<()>
Check if a document can be coerced to match the schema
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SchemaValidator
impl !RefUnwindSafe for SchemaValidator
impl Send for SchemaValidator
impl Sync for SchemaValidator
impl Unpin for SchemaValidator
impl UnsafeUnpin 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