Enum 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

Errors encountered performing operations using this crate 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.

Fields

§c: String

The invalid hex character

§index: usize

The index of the invalid hex character

§

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

Fields

§character: String

The invalid Base58 character

§index: usize

The index of the invalid character

§

Base58NonAsciiCharacter

Mirros the error for bs58 crate

Fields

§index: usize

The index of the non ASCII character

§

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§

Source§

impl BorshDeserialize for UtilitiesError

Source§

fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>

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

fn try_from_slice(v: &[u8]) -> Result<Self, Error>

Deserialize this instance from a slice of bytes.
Source§

impl BorshSerialize for UtilitiesError

Source§

fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), Error>

Source§

fn try_to_vec(&self) -> Result<Vec<u8>, Error>

Serialize this instance into a vector of bytes.
Source§

impl Clone for UtilitiesError

Source§

fn clone(&self) -> UtilitiesError

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for UtilitiesError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Error> for UtilitiesError

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl Ord for UtilitiesError

Source§

fn cmp(&self, other: &UtilitiesError) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for UtilitiesError

Source§

fn eq(&self, other: &UtilitiesError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for UtilitiesError

Source§

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 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Eq for UtilitiesError

Source§

impl StructuralPartialEq for UtilitiesError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.