pub enum ParseFilenameError {
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 ParseFilenameError
impl Clone for ParseFilenameError
Source§fn clone(&self) -> ParseFilenameError
fn clone(&self) -> ParseFilenameError
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 ParseFilenameError
impl Debug for ParseFilenameError
Source§impl Display for ParseFilenameError
impl Display for ParseFilenameError
Source§impl Error for ParseFilenameError
impl Error for ParseFilenameError
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<ParseFilenameError> for M2dirClientError
Available on crate feature client only.
impl From<ParseFilenameError> for M2dirClientError
Available on crate feature
client only.Source§fn from(source: ParseFilenameError) -> Self
fn from(source: ParseFilenameError) -> Self
Converts to this type from the input type.
Source§impl From<ParseFilenameError> for M2dirEntryGetError
impl From<ParseFilenameError> for M2dirEntryGetError
Source§fn from(source: ParseFilenameError) -> Self
fn from(source: ParseFilenameError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ParseFilenameError
impl RefUnwindSafe for ParseFilenameError
impl Send for ParseFilenameError
impl Sync for ParseFilenameError
impl Unpin for ParseFilenameError
impl UnsafeUnpin for ParseFilenameError
impl UnwindSafe for ParseFilenameError
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