pub enum Errors {
Simple(Vec<Error>),
List(Vec<Errors>),
Fields(BTreeMap<Cow<'static, str>, Errors>),
}Expand description
This type encapsulates a set of (potentially nested) validation errors.
Variants§
Implementations§
source§impl Errors
impl Errors
pub fn is_empty(&self) -> bool
pub fn flatten(self) -> Vec<(String, Error)>
pub fn empty() -> Self
pub fn simple<F>(f: F) -> Errorswhere F: FnMut(&mut SimpleErrorBuilder),
pub fn list<F>(f: F) -> Errorswhere F: FnMut(&mut ListErrorBuilder),
pub fn fields<F>(f: F) -> Errorswhere F: FnMut(&mut FieldsErrorBuilder),
Trait Implementations§
source§impl Error for Errors
impl Error for Errors
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()