pub struct NixError(/* private fields */);Expand description
Nix error type.
This wraps a nix::Error to avoid directly exposing the type in the public API, which
required a breaking change every time clearscreen updated its nix version.
To obtain a nix error, convert this error to an i32 then use nix::Error::from_raw:
Creating a NixError is explicitly not possible from the public API.
let nix_error = nix::Error::from_raw(error.into());
assert_eq!(nix_error, nix::Error::EINVAL);Trait Implementations§
Source§impl Error for NixError
impl Error for NixError
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§
impl Freeze for NixError
impl RefUnwindSafe for NixError
impl Send for NixError
impl Sync for NixError
impl Unpin for NixError
impl UnsafeUnpin for NixError
impl UnwindSafe for NixError
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