[][src]Trait semval::Validate

pub trait Validate {
    type Invalidity: Invalidity;
    fn validate(&self) -> Result<Self::Invalidity>;
}

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

Invalidity objectives

Loading content...

Required methods

fn validate(&self) -> Result<Self::Invalidity>

Perform the validation

Loading content...

Implementations on Foreign Types

impl<V> Validate for Option<V> where
    V: Validate
[src]

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

Loading content...

Implementors

Loading content...