pub struct Error { /* private fields */ }Expand description
The error type for filesystem operations.
Specific error codes are available as associated constants of this type.
assert_eq!(Error::IO.code(), -5);
assert_eq!(Error::new(-5), Some(Error::IO));Implementations§
Source§impl Error
impl Error
Sourcepub const CORRUPTION: Self
pub const CORRUPTION: Self
File or filesystem was corrupt.
Sourcepub const NO_SUCH_ENTRY: Self
pub const NO_SUCH_ENTRY: Self
No entry found with that name.
Sourcepub const ENTRY_ALREADY_EXISTED: Self
pub const ENTRY_ALREADY_EXISTED: Self
File or directory already exists.
Sourcepub const PATH_NOT_DIR: Self
pub const PATH_NOT_DIR: Self
Path name is not a directory.
Sourcepub const PATH_IS_DIR: Self
pub const PATH_IS_DIR: Self
Path specification is to a directory.
Sourcepub const DIR_NOT_EMPTY: Self
pub const DIR_NOT_EMPTY: Self
Directory was not empty.
Sourcepub const BAD_FILE_DESCRIPTOR: Self
pub const BAD_FILE_DESCRIPTOR: Self
Bad file descriptor.
Sourcepub const FILE_TOO_BIG: Self
pub const FILE_TOO_BIG: Self
File is too big.
Sourcepub const NO_ATTRIBUTE: Self
pub const NO_ATTRIBUTE: Self
No attribute or data available
Sourcepub const FILENAME_TOO_LONG: Self
pub const FILENAME_TOO_LONG: Self
Filename too long
Trait Implementations§
Source§impl Debug for Error
Prints a static string as the debug representation.
impl Debug for Error
Prints a static string as the debug representation.
If unwrap or expect is used on a Result<_, Error>, the Debug implementation is not
always optimized out. This leads to a significant increase of the binary size.
As a short-term fix, the Debug implementation currently always returns a static string.
impl Copy for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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