pub enum NvError {
InvalidString(NulError),
NativeError(i32),
AlreadySet,
NotFound,
OutOfMemory,
Io(Error),
OperationNotSupported,
InvalidStringEncoding(Utf8Error),
}
Expand description
Error kinds for Name/Value library.
Variants§
InvalidString(NulError)
Name a.k.a. key can’t contain NULL byte. You going to get this error if you try so.
NativeError(i32)
error return by ffi. See libc for more information.
AlreadySet
Trying to set an error on n/v list that already has error
NotFound
No value found for given name.
OutOfMemory
Library failed to allocate.
Io(Error)
Other IO errors
OperationNotSupported
Operation not support on a list given flags used to create the list.
InvalidStringEncoding(Utf8Error)
Got non-utf8 string from the library.
Trait Implementations§
source§impl Error for NvError
impl Error for NvError
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
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 !RefUnwindSafe for NvError
impl Send for NvError
impl Sync for NvError
impl Unpin for NvError
impl !UnwindSafe for NvError
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