#[non_exhaustive]pub enum HashUtilityError {
Show 17 variants
FileNotFound {
path: PathBuf,
},
DirectoryNotFound {
path: PathBuf,
},
PermissionDenied {
path: PathBuf,
operation: String,
},
IoError {
path: Option<PathBuf>,
operation: String,
source: Error,
},
UnsupportedAlgorithm {
algorithm: String,
},
AlgorithmUnavailable {
algorithm: String,
feature: &'static str,
},
InvalidDigest {
algorithm: String,
reason: String,
},
HashComputationFailed {
path: PathBuf,
algorithm: String,
reason: String,
},
Cancelled,
DatabaseNotFound {
path: PathBuf,
},
DatabaseParseError {
path: PathBuf,
line: usize,
reason: String,
},
DatabaseWriteError {
path: PathBuf,
reason: String,
},
EmptyDatabase {
path: PathBuf,
},
VerificationFailed {
reason: String,
},
InvalidArguments {
message: String,
},
MissingRequiredArgument {
argument: String,
},
BenchmarkFailed {
algorithm: String,
reason: String,
},
}Expand description
Main error type for the hash utility Provides context-rich error messages with file paths and operations
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
FileNotFound
A required file does not exist.
DirectoryNotFound
A required directory does not exist.
PermissionDenied
The process lacks permission for a filesystem operation.
Fields
IoError
Other input/output failure with operation context.
Fields
UnsupportedAlgorithm
A string does not identify a supported algorithm.
A known algorithm was disabled at compile time.
InvalidDigest
Digest text or bytes have an invalid value or length.
Fields
HashComputationFailed
A file could not be hashed.
Fields
Cancelled
Cooperative cancellation requested by an embedding application.
DatabaseNotFound
A requested manifest database does not exist.
DatabaseParseError
A manifest line could not be parsed.
Fields
DatabaseWriteError
A manifest could not be written.
EmptyDatabase
A manifest contained no usable entries.
VerificationFailed
Verification could not be completed.
InvalidArguments
An operation received an invalid combination of arguments.
MissingRequiredArgument
A compatibility operation did not receive a required argument.
BenchmarkFailed
An algorithm benchmark failed.
Implementations§
Trait Implementations§
Source§impl Debug for HashUtilityError
impl Debug for HashUtilityError
Source§impl Display for HashUtilityError
impl Display for HashUtilityError
Source§impl Error for HashUtilityError
impl Error for HashUtilityError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for HashUtilityError
impl !UnwindSafe for HashUtilityError
impl Freeze for HashUtilityError
impl Send for HashUtilityError
impl Sync for HashUtilityError
impl Unpin for HashUtilityError
impl UnsafeUnpin for HashUtilityError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more