pub struct PathValidationErrors {
base_dir: PathBuf,
errors: Vec<PathValidationError>,
}
Expand description
A list of errors that may occur when comparing Mtree
data with paths inside a base_dir
.
Tracks a base_dir
whose files are compared to Mtree
data.
Also tracks a list of zero or more PathValidationError
s that occurred when validating paths
inside base_dir
by comparing it with Mtree
data.
After initialization, append
can be used to add any
errors to this struct that occurred during validation.
After validation (which is considered an infallible action), calling
check
returns an error if any errors have been collected
during validation.
Fields§
§base_dir: PathBuf
§errors: Vec<PathValidationError>
Implementations§
Source§impl PathValidationErrors
impl PathValidationErrors
Sourcepub fn new(base_dir: PathBuf) -> Self
pub fn new(base_dir: PathBuf) -> Self
Creates a new PathValidationErrors
for a directory.
Sourcepub fn append(&mut self, other: &mut Vec<PathValidationError>)
pub fn append(&mut self, other: &mut Vec<PathValidationError>)
Appends a list of PathValidationError
s to self.errors
.
Trait Implementations§
Source§impl Debug for PathValidationErrors
impl Debug for PathValidationErrors
Source§impl Default for PathValidationErrors
impl Default for PathValidationErrors
Source§fn default() -> PathValidationErrors
fn default() -> PathValidationErrors
Returns the “default value” for a type. Read more
Source§impl Display for PathValidationErrors
impl Display for PathValidationErrors
Source§impl Error for PathValidationErrors
impl Error for PathValidationErrors
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<PathValidationErrors> for Error
impl From<PathValidationErrors> for Error
Source§fn from(source: PathValidationErrors) -> Self
fn from(source: PathValidationErrors) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PathValidationErrors
impl !RefUnwindSafe for PathValidationErrors
impl Send for PathValidationErrors
impl Sync for PathValidationErrors
impl Unpin for PathValidationErrors
impl !UnwindSafe for PathValidationErrors
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