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: Error
pub const CORRUPTION: Error
File or filesystem was corrupt.
Sourcepub const NO_SUCH_ENTRY: Error
pub const NO_SUCH_ENTRY: Error
No entry found with that name.
Sourcepub const ENTRY_ALREADY_EXISTED: Error
pub const ENTRY_ALREADY_EXISTED: Error
File or directory already exists.
Sourcepub const PATH_NOT_DIR: Error
pub const PATH_NOT_DIR: Error
Path name is not a directory.
Sourcepub const PATH_IS_DIR: Error
pub const PATH_IS_DIR: Error
Path specification is to a directory.
Sourcepub const DIR_NOT_EMPTY: Error
pub const DIR_NOT_EMPTY: Error
Directory was not empty.
Sourcepub const BAD_FILE_DESCRIPTOR: Error
pub const BAD_FILE_DESCRIPTOR: Error
Bad file descriptor.
Sourcepub const FILE_TOO_BIG: Error
pub const FILE_TOO_BIG: Error
File is too big.
Sourcepub const NO_ATTRIBUTE: Error
pub const NO_ATTRIBUTE: Error
No attribute or data available
Sourcepub const FILENAME_TOO_LONG: Error
pub const FILENAME_TOO_LONG: Error
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