pub struct LiteralSchema<T: Clone + PartialEq + Debug> { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl<T: Clone + Clone + PartialEq + Debug> Clone for LiteralSchema<T>
impl<T: Clone + Clone + PartialEq + Debug> Clone for LiteralSchema<T>
Source§fn clone(&self) -> LiteralSchema<T>
fn clone(&self) -> LiteralSchema<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Schema<String> for LiteralSchema<String>
impl Schema<String> for LiteralSchema<String>
fn validate(&self, value: &Value) -> ValidateResult<String>
fn parse(&self, value: &Value) -> T
fn safe_parse(&self, value: &Value) -> ValidateResult<T>
fn optional(self) -> OptionalSchema<Self, T>where
Self: Sized,
fn array(self) -> ArraySchema<Self, T>where
Self: Sized,
Source§impl Schema<f64> for LiteralSchema<f64>
impl Schema<f64> for LiteralSchema<f64>
fn validate(&self, value: &Value) -> ValidateResult<f64>
fn parse(&self, value: &Value) -> T
fn safe_parse(&self, value: &Value) -> ValidateResult<T>
fn optional(self) -> OptionalSchema<Self, T>where
Self: Sized,
fn array(self) -> ArraySchema<Self, T>where
Self: Sized,
Auto Trait Implementations§
impl<T> Freeze for LiteralSchema<T>where
T: Freeze,
impl<T> RefUnwindSafe for LiteralSchema<T>where
T: RefUnwindSafe,
impl<T> Send for LiteralSchema<T>where
T: Send,
impl<T> Sync for LiteralSchema<T>where
T: Sync,
impl<T> Unpin for LiteralSchema<T>where
T: Unpin,
impl<T> UnwindSafe for LiteralSchema<T>where
T: UnwindSafe,
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