pub struct ValidationErrors { /* private fields */ }Expand description
An aggregate of all configuration validation problems.
Implementations§
Source§impl ValidationErrors
impl ValidationErrors
Sourcepub fn new(errors: Vec<ValidationError>) -> Self
pub fn new(errors: Vec<ValidationError>) -> Self
Creates an aggregate from validation problems.
Callers should return Ok(()) instead when errors is empty.
Sourcepub fn errors(&self) -> &[ValidationError]
pub fn errors(&self) -> &[ValidationError]
Returns all collected validation problems.
Sourcepub fn into_errors(self) -> Vec<ValidationError>
pub fn into_errors(self) -> Vec<ValidationError>
Consumes the aggregate and returns its individual problems.
Trait Implementations§
Source§impl Clone for ValidationErrors
impl Clone for ValidationErrors
Source§impl Debug for ValidationErrors
impl Debug for ValidationErrors
Source§impl Display for ValidationErrors
impl Display for ValidationErrors
impl Eq for ValidationErrors
Source§impl Error for ValidationErrors
impl Error for ValidationErrors
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Source§impl From<ValidationErrors> for LoadError
impl From<ValidationErrors> for LoadError
Source§fn from(source: ValidationErrors) -> Self
fn from(source: ValidationErrors) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ValidationErrors
impl PartialEq for ValidationErrors
impl StructuralPartialEq for ValidationErrors
Auto Trait Implementations§
impl Freeze for ValidationErrors
impl RefUnwindSafe for ValidationErrors
impl Send for ValidationErrors
impl Sync for ValidationErrors
impl Unpin for ValidationErrors
impl UnsafeUnpin for ValidationErrors
impl UnwindSafe for ValidationErrors
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more