Struct diem_crypto::validatable::Validatable [−][src]
pub struct Validatable<V: Validate> { /* fields omitted */ }
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
Create a new Validatable
from an unvalidated type
Return a reference to the unvalidated form V::Unvalidated
Try to validate the unvalidated form returning Some(&V)
on success and None
on failure.
Trait Implementations
impl<'de, V> Deserialize<'de> for Validatable<V> where
V: Validate,
V::Unvalidated: Deserialize<'de>,
impl<'de, V> Deserialize<'de> for Validatable<V> where
V: Validate,
V::Unvalidated: Deserialize<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<V> PartialEq<Validatable<V>> for Validatable<V> where
V: Validate,
V::Unvalidated: PartialEq,
impl<V> PartialEq<Validatable<V>> for Validatable<V> where
V: Validate,
V::Unvalidated: PartialEq,
Auto Trait Implementations
impl<V> RefUnwindSafe for Validatable<V> where
V: UnwindSafe + RefUnwindSafe,
<V as Validate>::Unvalidated: RefUnwindSafe,
impl<V> Send for Validatable<V> where
V: Send,
<V as Validate>::Unvalidated: Send,
impl<V> Sync for Validatable<V> where
V: Send + Sync,
<V as Validate>::Unvalidated: Sync,
impl<V> Unpin for Validatable<V> where
V: Unpin,
<V as Validate>::Unvalidated: Unpin,
impl<V> UnwindSafe for Validatable<V> where
V: UnwindSafe,
<V as Validate>::Unvalidated: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Generates a hash used only for tests.