pub enum Error {
Show 36 variants
AssertionFailed(String),
BadEncryptedMessage,
Base64(DecodeError),
Bech32(Error),
Encryption,
WrongBech32(String, String),
Signature(Error),
EventInFuture,
Fmt(Error),
HashMismatch,
HexDecode(FromHexError),
InvalidEncryptedPrivateKey,
InvalidId,
InvalidIdPrefix,
InvalidLength(InvalidLength),
InvalidProfile,
InvalidPublicKey,
InvalidPublicKeyPrefix,
InvalidUrl(ParseError),
InvalidUrlHost(String),
InvalidUrlScheme(String),
InvalidUrlMissingAuthority,
Pad(PadError),
ParseInt(ParseIntError),
Scrypt,
SerdeJson(Error),
Slice(TryFromSliceError),
Time(SystemTimeError),
UnknownEventKind(u64),
UnknownKeySecurity(u8),
Unpad(UnpadError),
Url(String),
Utf8Error(Utf8Error),
WrongEventKind,
WrongLengthHexString,
WrongDecryptionPassword,
}
Expand description
Errors that can occur in the nostr-proto crate
Variants§
AssertionFailed(String)
Assertion failed
BadEncryptedMessage
Bad Encrypted Message
Base64(DecodeError)
Base64 error
Bech32(Error)
Bech32 error
Encryption
Encryption/Decryption Error
WrongBech32(String, String)
Bech32 error
Signature(Error)
Signature error
EventInFuture
Event is in the future
Fmt(Error)
Formatting error
HashMismatch
A hash mismatch verification error
HexDecode(FromHexError)
Hex string decoding error
InvalidEncryptedPrivateKey
Invalid encrypted private key
InvalidId
Invalid event Id
InvalidIdPrefix
Invalid event Id Prefix
InvalidLength(InvalidLength)
Invalid digest length
InvalidProfile
Invalid Profile
InvalidPublicKey
Invalid public key
InvalidPublicKeyPrefix
Invalid public key prefix
InvalidUrl(ParseError)
Invalid URL
InvalidUrlHost(String)
Invalid URL Host
InvalidUrlScheme(String)
Invalid URL Scheme
InvalidUrlMissingAuthority
Missing URL Authority
Pad(PadError)
Pad error
ParseInt(ParseIntError)
Parse integer error
Scrypt
Scrypt error
SerdeJson(Error)
Serialization error
Slice(TryFromSliceError)
Try from slice error
Time(SystemTimeError)
Time error
UnknownEventKind(u64)
Unknown event kind
UnknownKeySecurity(u8)
Unknown Key Security
Unpad(UnpadError)
Unpad error
Url(String)
Url Error
Utf8Error(Utf8Error)
UTF-8 error
WrongEventKind
Wrong event kind
WrongLengthHexString
Wrong length hex string
WrongDecryptionPassword
Wrong Decryption Password
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 From<DecodeError> for Error
impl From<DecodeError> for Error
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<FromHexError> for Error
impl From<FromHexError> for Error
Source§fn from(source: FromHexError) -> Self
fn from(source: FromHexError) -> Self
Converts to this type from the input type.
Source§impl From<InvalidLength> for Error
impl From<InvalidLength> for Error
Source§fn from(source: InvalidLength) -> Self
fn from(source: InvalidLength) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for Error
impl From<ParseIntError> for Error
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Converts to this type from the input type.
Source§impl From<SystemTimeError> for Error
impl From<SystemTimeError> for Error
Source§fn from(source: SystemTimeError) -> Self
fn from(source: SystemTimeError) -> Self
Converts to this type from the input type.
Source§impl From<TryFromSliceError> for Error
impl From<TryFromSliceError> for Error
Source§fn from(source: TryFromSliceError) -> Self
fn from(source: TryFromSliceError) -> Self
Converts to this type from the input type.
Source§impl From<UnpadError> for Error
impl From<UnpadError> for Error
Source§fn from(source: UnpadError) -> Self
fn from(source: UnpadError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin 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