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.