pub enum Error {
Rnp {
code: u32,
kind: ErrorKind,
message: String,
},
NullPointer,
NulByte,
PathNul,
UnknownVariant {
kind: &'static str,
value: String,
},
Io {
source: Error,
},
}Expand description
A failure returned by the underlying librnp call, or a wrapper-level precondition violation.
Variants§
Rnp
The RNP call returned a non-success result code.
NullPointer
A required pointer/handle was unexpectedly null.
NulByte
A NUL byte was found in a string that must be passed to librnp as a C string.
PathNul
A NUL byte was found in a path that must be passed to librnp.
UnknownVariant
A string-to-enum conversion failed because the string doesn’t
match any known variant. Surfaces from FromStr impls on the
model enums.
Io
An I/O operation at the Rust/C boundary failed.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Source§impl ErrorCompat for Error
impl ErrorCompat for Error
Source§fn iter_chain(&self) -> ChainCompat<'_, '_> ⓘwhere
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_> ⓘwhere
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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