pub trait ValidateSeq<S: Span> {
type Error: Error;
// Required methods
fn with_span(&mut self, span: Option<S>) -> &mut Self;
fn validate_element<V>(&mut self, value: &V) -> Result<(), Self::Error>
where V: ?Sized + Validate<Span = S> + Hash;
fn end(self) -> Result<(), Self::Error>;
}
Expand description
Type returned by validate_seq.
Required Associated Types§
Required Methods§
Sourcefn with_span(&mut self, span: Option<S>) -> &mut Self
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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.