pub struct NullSchema;Implementations§
Source§impl NullSchema
impl NullSchema
Trait Implementations§
Source§impl Clone for NullSchema
impl Clone for NullSchema
Source§fn clone(&self) -> NullSchema
fn clone(&self) -> NullSchema
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 moreSource§impl Debug for NullSchema
impl Debug for NullSchema
Source§impl Default for NullSchema
impl Default for NullSchema
Source§impl Schema<()> for NullSchema
impl Schema<()> for NullSchema
Source§fn validate(&self, value: &Value) -> ValidateResult<()>
fn validate(&self, value: &Value) -> ValidateResult<()>
Validates the value against this schema and returns the validated result.
Source§fn parse(&self, value: &Value) -> T
fn parse(&self, value: &Value) -> T
Validates and returns the result, panicking on validation failure. Read more
Source§fn safe_parse(&self, value: &Value) -> ValidateResult<T>
fn safe_parse(&self, value: &Value) -> ValidateResult<T>
Validates the value and returns a Result. This is the recommended method for handling
validation in production code.
fn optional(self) -> OptionalSchema<Self, T>where
Self: Sized,
fn array(self) -> ArraySchema<Self, T>where
Self: Sized,
Auto Trait Implementations§
impl Freeze for NullSchema
impl RefUnwindSafe for NullSchema
impl Send for NullSchema
impl Sync for NullSchema
impl Unpin for NullSchema
impl UnwindSafe for NullSchema
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