[−][src]Trait semval::Validate
A trait for validating types
Validation is expected to be an expensive operation that should only be invoked when crossing boundaries between independent components.
Associated Types
type Invalidity: Invalidity
[src]
Invalidity objectives
Required methods
pub fn validate(&self) -> Result<Self::Invalidity>
[src]
Perform the validation
Implementations on Foreign Types
impl<'a, V> Validate for &'a V where
V: Validate,
[src]
V: Validate,
Validate
is implemented for any reference of a type
that implements Validate
.
type Invalidity = V::Invalidity
pub fn validate(&self) -> Result<Self::Invalidity>
[src]
impl<V> Validate for Option<V> where
V: Validate,
[src]
V: Validate,
Validate Some
or otherwise implicitly evaluate to Ok
in case of None
If the absence of an optional value is considered a validation error this must be checked separately.
type Invalidity = V::Invalidity
pub fn validate(&self) -> Result<Self::Invalidity>
[src]
impl<V> Validate for [V] where
V: Validate,
[src]
V: Validate,
Validate all elements of a slice
type Invalidity = V::Invalidity
pub fn validate(&self) -> Result<Self::Invalidity>
[src]
impl<V> Validate for Vec<V> where
V: Validate,
[src]
V: Validate,