pub enum NavError {
NotFound(PathBuf),
NotADirectory(PathBuf),
PermissionDenied(PathBuf),
InvalidName(String),
NoPendingOperation,
NoHistory,
Io {
path: PathBuf,
source: Error,
},
}Expand description
Errors specific to navigation operations
Variants§
NotFound(PathBuf)
Path does not exist
NotADirectory(PathBuf)
Path exists but is not a directory
PermissionDenied(PathBuf)
Access denied to path
InvalidName(String)
Invalid filename for create/rename operations
NoPendingOperation
Attempted to resolve/confirm when no operation is pending
NoHistory
Attempted to navigate history when none exists
Io
I/O error with path context
Implementations§
Sourcepub fn io(path: impl Into<PathBuf>, source: Error) -> Self
pub fn io(path: impl Into<PathBuf>, source: Error) -> Self
Create an I/O error with path context
Sourcepub fn from_error_with_path(err: Error, path: impl Into<PathBuf>) -> Self
pub fn from_error_with_path(err: Error, path: impl Into<PathBuf>) -> Self
Convert a crate::Error to NavError with path context for I/O errors
Use this instead of .into() when you have path context available,
to preserve the path in I/O error messages.
Trait Implementations§
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§
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