pub enum HashError {
InvalidPath(RelativePathError),
AbsoluteNotUnderRoot(String),
AmbiguousPath {
path: String,
nfc: String,
},
Io {
path: PathBuf,
source: Error,
},
Walk(ModuleWalkError),
Tree(TreeError),
}Expand description
An error during content hashing.
Variants§
InvalidPath(RelativePathError)
A path supplied to Hasher::try_add failed relative-path
validation.
AbsoluteNotUnderRoot(String)
An absolute path was supplied that does not live under the module root.
AmbiguousPath
A new path collides under Unicode Normalization Form C (NFC) with a path that was already recorded. The spec requires the module’s set of relative paths to be unique under NFC.
Io
I/O failure while reading a file.
Fields
Walk(ModuleWalkError)
A tree walk error (symlink containment, metadata target, etc.).
Tree(TreeError)
A module file-tree validation error (reserved-filename placement, NFC duplicate paths).
Trait Implementations§
Source§impl Error for HashError
impl Error for HashError
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<ModuleWalkError> for HashError
impl From<ModuleWalkError> for HashError
Source§fn from(source: ModuleWalkError) -> Self
fn from(source: ModuleWalkError) -> Self
Converts to this type from the input type.
Source§impl From<RelativePathError> for HashError
impl From<RelativePathError> for HashError
Source§fn from(source: RelativePathError) -> Self
fn from(source: RelativePathError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for HashError
impl !UnwindSafe for HashError
impl Freeze for HashError
impl Send for HashError
impl Sync for HashError
impl Unpin for HashError
impl UnsafeUnpin for HashError
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