Skip to main content

Error

Trait Error 

Source
pub trait Error:
    Sized
    + Error
    + AddAssign {
    // Required method
    fn custom<T: Display>(error: T) -> Self;
}
Expand description

The errors returned by validators must implement this trait.

The AddAssign bound is required in order to support validators that return multiple errors.

Required Methods§

Source

fn custom<T: Display>(error: T) -> Self

Values that are being validated can report errors that are not related to the validators.

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.

Implementors§

Source§

impl<S: Span> Error for Errors<S>

Available on crate feature schemars only.