[][src]Trait verify::Verifier

pub trait Verifier<S: Span> {
    type Error: Error;
    fn verify_value<V: ?Sized + Validate<Span = S>>(
        &self,
        value: &V
    ) -> Result<(), Self::Error>; fn verify_value_with_span<V: ?Sized + Validate<Span = S>>(
        &self,
        value: &V,
        _span: Option<V::Span>
    ) -> Result<(), Self::Error> { ... } }

This trait is implemented by types that validate a value internally.

It is useful when the actual Validator is not exposed, or there might be more than one validations taking place for the same value.

Associated Types

type Error: Error

The error returned by the validator.

Loading content...

Required methods

fn verify_value<V: ?Sized + Validate<Span = S>>(
    &self,
    value: &V
) -> Result<(), Self::Error>

Validate a value internally.

Loading content...

Provided methods

fn verify_value_with_span<V: ?Sized + Validate<Span = S>>(
    &self,
    value: &V,
    _span: Option<V::Span>
) -> Result<(), Self::Error>

Validators that support hierarchical spans might require a starting parent span.

Loading content...

Implementors

Loading content...