Struct validations::Error
[−]
[src]
pub struct Error<T> where
T: Debug + Any, { /* fields omitted */ }
An individual validation error.
Methods
impl<T> Error<T> where
T: Debug + Any,
[src]
T: Debug + Any,
fn new<S>(message: S) -> Self where
S: Into<String>,
S: Into<String>,
Constructs a validation error.
fn with_details<S>(message: S, details: T) -> Self where
S: Into<String>,
S: Into<String>,
Constructs a validation error with additional details.
fn details(&self) -> Option<&T>
Additional contextual information about the error, if provided.
fn set_details(&mut self, details: T)
Sets the details of this error.
fn message(&self) -> &str
A human-readable message explaining the error.
Trait Implementations
impl<T: Debug> Debug for Error<T> where
T: Debug + Any,
[src]
T: Debug + Any,
impl<T> Display for Error<T> where
T: Debug + Any,
[src]
T: Debug + Any,
fn fmt(&self, f: &mut Formatter) -> FmtResult
Formats the value using the given formatter. Read more
impl<T> StdError for Error<T> where
T: Debug + Any,
[src]
T: Debug + Any,