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

Fields

c: String

The invalid hex character

index: usize

The index of the invalid hex character

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

Fields

character: String

The invalid Base58 character

index: usize

The index of the invalid character

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

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes. Read more

Deserialize this instance from a slice of bytes.

Serialize this instance into a vector of bytes.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.