[][src]Trait verify::ValidateSeq

pub trait ValidateSeq<S: Span> {
    type Error: Error;
    fn with_span(&mut self, span: Option<S>) -> &mut Self;
fn validate_element<V: ?Sized>(
        &mut self,
        value: &V
    ) -> Result<(), Self::Error>
    where
        V: Validate<Span = S> + Hash
;
fn end(self) -> Result<(), Self::Error>; }

Type returned by validate_seq.

Associated Types

type Error: Error

The error returned by the validator.

Loading content...

Required methods

fn with_span(&mut self, span: Option<S>) -> &mut Self

Set the span for the current value that is being validated.

In some cases this is needed to ensure that the validator returns the correct span in its errors.

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

Validate an element in the sequence.

fn end(self) -> Result<(), Self::Error>

End the sequence.

Loading content...

Implementors

Loading content...