Enum web3utilities::UtilitiesError
source · [−]pub enum UtilitiesError {
Show 33 variants
LengthLessThan12Bytes,
LengthGreaterThan12Bytes,
LengthLessThan16Bytes,
LengthGreaterThan16Bytes,
LengthLessThan24Bytes,
LengthGreaterThan24Bytes,
LengthLessThan32Bytes,
LengthGreaterThan32Bytes,
LengthLessThan64Bytes,
LengthGreaterThan64Bytes,
LengthLessThan128Bytes,
LengthGreaterThan128Bytes,
InvalidBytesForEd25519Keypair,
InvalidBytesForEd25519PublicKey,
InvalidBytesForEd25519Signature,
InvalidBytesForSr25519Keypair,
InvalidBytesForSr25519PublicKey,
InvalidBytesForSr25519Signature,
HexInvalidHexCharacter {
c: String,
index: usize,
},
HexOddLength,
HexInvalidStringLength,
Base58BufferTooSmall,
Base58InvalidCharacter {
character: String,
index: usize,
},
Base58NonAsciiCharacter {
index: usize,
},
InvalidEd25519Signature,
XChaCha8Poly1305EncryptionError,
XChaCha8Poly1305DecryptionError,
InvalidBytesForKeyPair,
InvalidBytesForPublicKey,
InvalidBytesForSecretKey,
SigningError,
MemoryCouldNotbeZeroized,
Io(IoErrorKind),
}
Expand description
Common Errors
Variants
LengthLessThan12Bytes
The byte length is less than 12 bytes
LengthGreaterThan12Bytes
The byte length is greater than 12 bytes
LengthLessThan16Bytes
The byte length is less than 16 bytes
LengthGreaterThan16Bytes
The byte length is greater than 16 bytes
LengthLessThan24Bytes
The byte length is less than 24 bytes
LengthGreaterThan24Bytes
The byte length is greater than 12 bytes
LengthLessThan32Bytes
The byte length is less than 32 bytes
LengthGreaterThan32Bytes
The byte length is greater than 12 bytes
LengthLessThan64Bytes
The byte length is less than 64 bytes
LengthGreaterThan64Bytes
The byte length is greater than 64 bytes
LengthLessThan128Bytes
The byte length is less than 128 bytes
LengthGreaterThan128Bytes
The byte length is greater than 128 bytes
InvalidBytesForEd25519Keypair
The bytes provided for the Ed25519 Keypair are invalid
InvalidBytesForEd25519PublicKey
The bytes provided for the Ed25519 Public Key are invalid
InvalidBytesForEd25519Signature
The bytes provided for the Ed25519 Signature are invalid
InvalidBytesForSr25519Keypair
The bytes provided for the SR25519 Keypair are invalid
InvalidBytesForSr25519PublicKey
The bytes provided for the SR25519 Public Key are invalid
InvalidBytesForSr25519Signature
The bytes provided for the Sr25519 Signature are invalid
HexInvalidHexCharacter
An invalid character was found. Valid ones are: 0...9
, a...f
or A...F
.
HexOddLength
A hex string’s length needs to be even, as two digits correspond to one byte.
HexInvalidStringLength
If the hex string is decoded into a fixed sized container, such as an array, the hex string’s length * 2 has to match the container’s length.
Base58BufferTooSmall
Buffer
Base58InvalidCharacter
Mirros the error for bs58
crate
Base58NonAsciiCharacter
Fields
index: usize
The index of the non ASCII character
Mirros the error for bs58
crate
InvalidEd25519Signature
The public key did not sign the provided signature
XChaCha8Poly1305EncryptionError
The bytes provided could not be encrypted
XChaCha8Poly1305DecryptionError
The encrypted bytes provided could not be decrypted
InvalidBytesForKeyPair
The bytes provided for the ed25519_dalek::Keypair
are invalid
InvalidBytesForPublicKey
The bytes provided for the ed25519_dalek::PublicKey
are invalid
InvalidBytesForSecretKey
The bytes provided for the ed25519_dalek::SecretKey
are invalid
SigningError
Could not sign the message. The actual error is opaque to prevent side-channel attacks
MemoryCouldNotbeZeroized
The memory occupied by ed25519_dalek::Keypair
stored in Ed25519Vault
could not be wiped
Io(IoErrorKind)
std::io::ErrorKind
conversion
Trait Implementations
sourceimpl BorshDeserialize for UtilitiesError where
String: BorshDeserialize,
usize: BorshDeserialize,
String: BorshDeserialize,
usize: BorshDeserialize,
usize: BorshDeserialize,
IoErrorKind: BorshDeserialize,
impl BorshDeserialize for UtilitiesError where
String: BorshDeserialize,
usize: BorshDeserialize,
String: BorshDeserialize,
usize: BorshDeserialize,
usize: BorshDeserialize,
IoErrorKind: BorshDeserialize,
sourceimpl BorshSerialize for UtilitiesError where
String: BorshSerialize,
usize: BorshSerialize,
String: BorshSerialize,
usize: BorshSerialize,
usize: BorshSerialize,
IoErrorKind: BorshSerialize,
impl BorshSerialize for UtilitiesError where
String: BorshSerialize,
usize: BorshSerialize,
String: BorshSerialize,
usize: BorshSerialize,
usize: BorshSerialize,
IoErrorKind: BorshSerialize,
sourceimpl Clone for UtilitiesError
impl Clone for UtilitiesError
sourcefn clone(&self) -> UtilitiesError
fn clone(&self) -> UtilitiesError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for UtilitiesError
impl Debug for UtilitiesError
sourceimpl From<Error> for UtilitiesError
impl From<Error> for UtilitiesError
sourceimpl Ord for UtilitiesError
impl Ord for UtilitiesError
sourcefn cmp(&self, other: &UtilitiesError) -> Ordering
fn cmp(&self, other: &UtilitiesError) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<UtilitiesError> for UtilitiesError
impl PartialEq<UtilitiesError> for UtilitiesError
sourcefn eq(&self, other: &UtilitiesError) -> bool
fn eq(&self, other: &UtilitiesError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl PartialOrd<UtilitiesError> for UtilitiesError
impl PartialOrd<UtilitiesError> for UtilitiesError
sourcefn partial_cmp(&self, other: &UtilitiesError) -> Option<Ordering>
fn partial_cmp(&self, other: &UtilitiesError) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for UtilitiesError
impl StructuralEq for UtilitiesError
impl StructuralPartialEq for UtilitiesError
Auto Trait Implementations
impl RefUnwindSafe for UtilitiesError
impl Send for UtilitiesError
impl Sync for UtilitiesError
impl Unpin for UtilitiesError
impl UnwindSafe for UtilitiesError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more