pub struct Validator { /* private fields */ }Expand description
Validator for PlanSpec resources.
Implementations§
Source§impl Validator
impl Validator
Sourcepub fn new() -> Result<Self, ValidationError>
pub fn new() -> Result<Self, ValidationError>
Create a new validator with embedded schemas.
Sourcepub fn validate(&self, resource: &Resource) -> Result<(), Vec<ValidationError>>
pub fn validate(&self, resource: &Resource) -> Result<(), Vec<ValidationError>>
Validate a resource.
Sourcepub fn validate_json(&self, value: &Value) -> Result<(), Vec<ValidationError>>
pub fn validate_json(&self, value: &Value) -> Result<(), Vec<ValidationError>>
Validate a JSON value as a resource.
Auto Trait Implementations§
impl !RefUnwindSafe for Validator
impl !UnwindSafe for Validator
impl Freeze for Validator
impl Send for Validator
impl Sync for Validator
impl Unpin for Validator
impl UnsafeUnpin 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