pub enum M2dirEntryParseError {
NotFile(M2dirPath),
MissingFilename(M2dirPath),
InvalidFilename {
path: M2dirPath,
reason: &'static str,
},
InvalidChecksum {
path: M2dirPath,
expected: String,
got: String,
},
}Expand description
Errors that can occur while parsing or validating an entry filename.
Variants§
NotFile(M2dirPath)
The given path is not a regular file.
MissingFilename(M2dirPath)
The path has no final filename component.
InvalidFilename
The filename does not match the m2dir specification.
InvalidChecksum
The checksum embedded in the filename does not match the file contents.
Trait Implementations§
Source§impl Clone for M2dirEntryParseError
impl Clone for M2dirEntryParseError
Source§fn clone(&self) -> M2dirEntryParseError
fn clone(&self) -> M2dirEntryParseError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for M2dirEntryParseError
impl Debug for M2dirEntryParseError
Source§impl Display for M2dirEntryParseError
impl Display for M2dirEntryParseError
Source§impl Error for M2dirEntryParseError
impl Error for M2dirEntryParseError
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<M2dirEntryParseError> for M2dirClientError
Available on crate feature client only.
impl From<M2dirEntryParseError> for M2dirClientError
Available on crate feature
client only.Source§fn from(source: M2dirEntryParseError) -> Self
fn from(source: M2dirEntryParseError) -> Self
Converts to this type from the input type.
Source§impl From<M2dirEntryParseError> for M2dirEntryGetError
impl From<M2dirEntryParseError> for M2dirEntryGetError
Source§fn from(source: M2dirEntryParseError) -> Self
fn from(source: M2dirEntryParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for M2dirEntryParseError
impl RefUnwindSafe for M2dirEntryParseError
impl Send for M2dirEntryParseError
impl Sync for M2dirEntryParseError
impl Unpin for M2dirEntryParseError
impl UnsafeUnpin for M2dirEntryParseError
impl UnwindSafe for M2dirEntryParseError
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