pub enum Error {
Show 14 variants
ChaCha20Poly1305(Error),
InvalidScryptParams(InvalidParams),
InvalidScryptOutputLen(InvalidOutputLen),
Keys(Error),
TryFromSlice,
InvalidLength {
expected: usize,
found: usize,
},
UnknownVersion(u8),
UnknownKeySecurity(u8),
VersionNotFound,
Log2RoundNotFound,
SaltNotFound,
NonceNotFound,
KeySecurityNotFound,
CipherTextNotFound,
}Expand description
NIP49 error
Variants§
ChaCha20Poly1305(Error)
ChaCha20Poly1305 error
InvalidScryptParams(InvalidParams)
Invalid scrypt params
InvalidScryptOutputLen(InvalidOutputLen)
Invalid scrypt output len
Keys(Error)
Keys error
TryFromSlice
Try from slice
InvalidLength
Invalid len
UnknownVersion(u8)
Unknown version
UnknownKeySecurity(u8)
Unknown Key Security
VersionNotFound
Version not found
Log2RoundNotFound
Log2 round not found
SaltNotFound
Salt not found
NonceNotFound
Nonce not found
KeySecurityNotFound
Key security not found
CipherTextNotFound
Cipthertext not found
Trait Implementations§
Source§impl Error for Error
Available on crate feature std only.
impl Error for Error
Available on crate feature
std only.1.30.0 · 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 From<InvalidOutputLen> for Error
impl From<InvalidOutputLen> for Error
Source§fn from(e: InvalidOutputLen) -> Self
fn from(e: InvalidOutputLen) -> Self
Converts to this type from the input type.
Source§impl From<InvalidParams> for Error
impl From<InvalidParams> for Error
Source§fn from(e: InvalidParams) -> Self
fn from(e: InvalidParams) -> Self
Converts to this type from the input type.
Source§impl From<TryFromSliceError> for Error
impl From<TryFromSliceError> for Error
Source§fn from(_e: TryFromSliceError) -> Self
fn from(_e: TryFromSliceError) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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