pub enum IoError {
PermissionDenied {
path: PathBuf,
},
DiskFull {
path: PathBuf,
},
NotABonesProject {
path: PathBuf,
},
Generic {
path: PathBuf,
reason: String,
},
}Expand description
Errors related to filesystem and I/O operations.
Variants§
PermissionDenied
Permission denied accessing a path.
DiskFull
The disk is full.
NotABonesProject
The directory is not a bones project.
Generic
Generic I/O error with context.
Implementations§
Source§impl IoError
impl IoError
Sourcepub const fn error_code(&self) -> &'static str
pub const fn error_code(&self) -> &'static str
Machine-readable error code.
Sourcepub fn suggestion(&self) -> String
pub fn suggestion(&self) -> String
Human-readable suggestion.
Trait Implementations§
Source§impl Error for IoError
impl Error for IoError
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()
Auto Trait Implementations§
impl Freeze for IoError
impl RefUnwindSafe for IoError
impl Send for IoError
impl Sync for IoError
impl Unpin for IoError
impl UnsafeUnpin for IoError
impl UnwindSafe for IoError
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