pub enum ProcError {
PermissionDenied(Option<PathBuf>),
NotFound(Option<PathBuf>),
Incomplete(Option<PathBuf>),
Io(Error, Option<PathBuf>),
Other(String),
InternalError(InternalError),
}
Expand description
The various error conditions in the procfs crate.
Most of the variants have an Option<PathBuf>
component. If the error root cause was related
to some operation on a file, the path of this file will be stored in this component.
Variants
PermissionDenied(Option<PathBuf>)
A standard permission denied error.
This will be a common error, since some files in the procfs filesystem are only readable by the root user.
NotFound(Option<PathBuf>)
This might mean that the process no longer exists, or that your kernel doesn’t support the feature you are trying to use.
Incomplete(Option<PathBuf>)
This might mean that a procfs file has incomplete contents.
If you encounter this error, consider retrying the operation.
Io(Error, Option<PathBuf>)
Any other IO error (rare).
Other(String)
Any other non-IO error (very rare).
InternalError(InternalError)
This error indicates that some unexpected error occurred. This is a bug. The inner InternalError struct will contain some more info.
If you ever encounter this error, consider it a bug in the procfs crate and please report it on github.
Trait Implementations
sourceimpl Error for ProcError
impl Error for ProcError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<Infallible> for ProcError
impl From<Infallible> for ProcError
sourcefn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Converts to this type from the input type.
sourceimpl From<ParseIntError> for ProcError
impl From<ParseIntError> for ProcError
sourcefn from(val: ParseIntError) -> Self
fn from(val: ParseIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for ProcError
impl Send for ProcError
impl Sync for ProcError
impl Unpin for ProcError
impl !UnwindSafe for ProcError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more