Struct diem_crypto::validatable::Validatable
source · 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 copy 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>where
V: Validate,
V::Unvalidated: Deserialize<'de>,
impl<'de, V> Deserialize<'de> for Validatable<V>where V: Validate, V::Unvalidated: Deserialize<'de>,
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>where
V: Validate,
V::Unvalidated: Hash,
impl<V> Hash for Validatable<V>where V: Validate, V::Unvalidated: Hash,
source§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,
source§impl<V> Serialize for Validatable<V>where
V: Validate + Serialize,
V::Unvalidated: Serialize,
impl<V> Serialize for Validatable<V>where V: Validate + Serialize, V::Unvalidated: Serialize,
impl<V> Eq for Validatable<V>where V: Validate, V::Unvalidated: Eq,
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§
source§impl<T> TestOnlyHash for Twhere
T: Serialize + ?Sized,
impl<T> TestOnlyHash for Twhere T: Serialize + ?Sized,
source§fn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.