Struct validations::Errors [] [src]

pub struct Errors<T> where
    T: Debug + Any
{ /* fields omitted */ }

A collection of errors returned by a failed validation.

Methods

impl<T> Errors<T> where
    T: Debug + Any
[src]

Constructs an empty Errors value.

Adds a validation error that is not specific to any field.

Adds a validation error for the given field.

Calling this method will overwrite any errors assigned via set_field_errors.

A slice of non-field-specific errors, if any.

The Errors for the given field, if any.

Returns true if there are no errors.

Sets the given field's errors to the given Errors.

This is useful if the field itself implements Validate. In that case, the parent type can simply delegate to the field to validate itself and assign the resulting errors using this method.

Calling this method will overwrite any field errors previously added with add_field_error.

Trait Implementations

impl<T: Debug> Debug for Errors<T> where
    T: Debug + Any
[src]

Formats the value using the given formatter.

impl<T> Display for Errors<T> where
    T: Debug + Any
[src]

Formats the value using the given formatter. Read more

impl<T> StdError for Errors<T> where
    T: Debug + Any
[src]

A short description of the error. Read more

The lower-level cause of this error, if any. Read more