pub enum Error {
Sys(Errno),
InvalidPath,
InvalidUtf8,
UnsupportedOperation,
}
Expand description
Nix Error Type
The nix error type provides a common way of dealing with various system system/libc calls that might fail. Each error has a corresponding errno (usually the one from the underlying OS) to which it can be mapped in addition to implementing other common traits.
Variants§
Sys(Errno)
InvalidPath
InvalidUtf8
The operation involved a conversion to Rust’s native String type, which failed because the string did not contain all valid UTF-8.
UnsupportedOperation
The operation is not supported by Nix, in this instance either use the libc bindings or consult the module documentation to see if there is a more appropriate interface available.
Implementations§
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
source§fn from(_: FromUtf8Error) -> Error
fn from(_: FromUtf8Error) -> Error
Converts to this type from the input type.