pub enum DecodeError {
InvalidBase32,
TooShort,
TooLong,
ChecksumMismatch,
UnsupportedVersion,
UnsupportedClaimableBalanceVersion,
InvalidPayloadLength,
InvalidPadding,
PrivateKey,
}Expand description
An error returned when decoding a strkey.
Variants§
InvalidBase32
The input is not valid base32 (no padding): an invalid symbol, an invalid encoded length, or non-zero trailing bits were encountered.
TooShort
The decoded data is shorter than the minimum required to contain a version byte and CRC.
TooLong
The decoded data is longer than the maximum the requested strkey kind can hold.
ChecksumMismatch
The CRC16-XMODEM checksum did not match.
UnsupportedVersion
The version byte is not a supported strkey kind for the type being decoded.
UnsupportedClaimableBalanceVersion
The claimable-balance sub-version byte (the first byte of the payload)
is not a supported claimable-balance version. Only V0 (0x00) is
defined.
InvalidPayloadLength
The decoded payload does not have the expected length for the strkey kind.
InvalidPadding
The payload contains padding bytes that must be zero but are not.
PrivateKey
The input is S-prefixed and may be a private-key strkey. Strkey
does not parse S…. Route the input to
ed25519::PrivateKey.
Trait Implementations§
Source§impl Clone for DecodeError
impl Clone for DecodeError
Source§fn clone(&self) -> DecodeError
fn clone(&self) -> DecodeError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
impl Eq for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl Ord for DecodeError
impl Ord for DecodeError
Source§fn cmp(&self, other: &DecodeError) -> Ordering
fn cmp(&self, other: &DecodeError) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for DecodeError
impl PartialEq for DecodeError
Source§fn eq(&self, other: &DecodeError) -> bool
fn eq(&self, other: &DecodeError) -> bool
self and other values to be equal, and is used by ==.