pub struct Validatable<V: Validate> { /* private fields */ }Expand description
Used in connection with the Validate trait to be able to represent types which can benefit
from deferred validation as a performance optimization.
Implementations§
Source§impl<V: Validate> Validatable<V>
impl<V: Validate> Validatable<V>
Sourcepub fn new_unvalidated(unvalidated: V::Unvalidated) -> Self
pub fn new_unvalidated(unvalidated: V::Unvalidated) -> Self
Create a new Validatable from an unvalidated type
Sourcepub fn unvalidated(&self) -> &V::Unvalidated
pub fn unvalidated(&self) -> &V::Unvalidated
Return a reference to the unvalidated form V::Unvalidated
Trait Implementations§
Source§impl<V: Clone + Validate> Clone for Validatable<V>where
V::Unvalidated: Clone,
impl<V: Clone + Validate> Clone for Validatable<V>where
V::Unvalidated: Clone,
Source§fn clone(&self) -> Validatable<V>
fn clone(&self) -> Validatable<V>
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<V: Debug + Validate> Debug for Validatable<V>where
V::Unvalidated: Debug,
impl<V: Debug + Validate> Debug for Validatable<V>where
V::Unvalidated: Debug,
Source§impl<'de, V> Deserialize<'de> for Validatable<V>
impl<'de, V> Deserialize<'de> for Validatable<V>
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<V> Hash for Validatable<V>
impl<V> Hash for Validatable<V>
Source§impl<V> PartialEq for Validatable<V>
impl<V> PartialEq for Validatable<V>
Source§impl<V> Serialize for Validatable<V>
impl<V> Serialize for Validatable<V>
impl<V> Eq for Validatable<V>
Auto Trait Implementations§
impl<V> !Freeze for Validatable<V>
impl<V> RefUnwindSafe for Validatable<V>
impl<V> Send for Validatable<V>
impl<V> Sync for Validatable<V>
impl<V> Unpin for Validatable<V>
impl<V> UnwindSafe for Validatable<V>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> TestOnlyHash for T
impl<T> TestOnlyHash for T
Source§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.