pub enum SystemError {
NotAbsolute {
path: String,
},
NoHome,
AlreadyExists {
path: String,
},
Locked {
action: &'static str,
path: String,
holders: String,
source: Error,
},
Io {
action: &'static str,
path: String,
source: Error,
},
}Expand description
Failures of host path resolution and host file operations.
Variants§
NotAbsolute
A path that must be absolute was not, and this module refuses to make it absolute against the working directory — that is how an index ends up wherever the binary happened to be started.
NoHome
The home directory could not be determined (HOME/USERPROFILE unset).
AlreadyExists
The destination of a move is occupied, and this module never overwrites: the caller decides what to do with the file already there.
Locked
A file could not be renamed or deleted because something still holds it open. Windows only — unix does neither operation on the handle.
Separate from SystemError::Io because the OS message (“the process
cannot access the file because it is being used by another process”)
never says which process, which leaves both the user and a bug report
with nothing to act on. holders is what the Restart Manager reports,
or "unknown" when it will not say.
Fields
Io
A filesystem call failed.
Trait Implementations§
Source§impl Debug for SystemError
impl Debug for SystemError
Source§impl Display for SystemError
impl Display for SystemError
Source§impl Error for SystemError
impl Error for SystemError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for SystemError
impl !UnwindSafe for SystemError
impl Freeze for SystemError
impl Send for SystemError
impl Sync for SystemError
impl Unpin for SystemError
impl UnsafeUnpin for SystemError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more