pub enum ErrorKind {
    UnexpectedType(StringString),
    NonExistentType,
    InvalidAddressLength(usize),
    HexParseError(String),
    UnknownType(StringString),
    UnexpectedToken(StringString),
    UnsupportedArrayDepth,
    ValidationError(String),
    UnequalArrayItems(u64Stringu64),
    InvalidArraySize(String),
}
Expand description

Possible errors encountered while hashing/encoding an EIP-712 compliant data structure

Variants

UnexpectedType(StringString)

if we fail to deserialize from a serde::Value as a type specified in message types fail with this error.

NonExistentType

the primary type supplied doesn’t exist in the MessageTypes

InvalidAddressLength(usize)

an invalid address was encountered during encoding

HexParseError(String)

a hex parse error occured

UnknownType(StringString)

the field was declared with a unknown type

UnexpectedToken(StringString)

Unexpected token

UnsupportedArrayDepth

the user has attempted to define a typed array with a depth > 10

ValidationError(String)

FieldType validation error

UnequalArrayItems(u64Stringu64)

the typed array defined in message types was declared with a fixed length that is of unequal length with the items to be encoded

InvalidArraySize(String)

Typed array length doesn’t fit into a u64

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Returns the “name” of the error. Read more

Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more

Returns a reference to the Backtrace carried by this failure, if it carries one. Read more

Provides context for this failure. Read more

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more

Performs the conversion.

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Converts a reference to Self into a dynamic trait object of Fail.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

Converts the given value to a String. 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.