pub enum QuacError {
Native {
code: ErrorCode,
message: String,
},
DeviceNotFound(String),
InvalidParameter(String),
VerificationFailed,
DecapsulationFailed,
NotInitialized,
BufferTooSmall {
needed: usize,
got: usize,
},
Io(Error),
Utf8(Utf8Error),
NullPointer,
Internal(String),
}Expand description
Main error type for QUAC 100 operations.
Variants§
Native
Error from the native library
DeviceNotFound(String)
Device not found
InvalidParameter(String)
Invalid parameter
VerificationFailed
Verification failed
DecapsulationFailed
Decapsulation failed
NotInitialized
Library not initialized
BufferTooSmall
Buffer too small
Io(Error)
I/O error
Utf8(Utf8Error)
UTF-8 conversion error
NullPointer
Null pointer error
Internal(String)
Internal error
Implementations§
Trait Implementations§
Source§impl Error for QuacError
impl Error for QuacError
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§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 QuacError
impl !RefUnwindSafe for QuacError
impl Send for QuacError
impl Sync for QuacError
impl Unpin for QuacError
impl !UnwindSafe for QuacError
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more