pub enum ErrorKind {
UnexpectedType(String, String),
NonExistentType,
InvalidAddressLength(usize),
HexParseError(String),
UnknownType(String, String),
UnexpectedToken(String, String),
UnsupportedArrayDepth,
ValidationError(String),
UnequalArrayItems(u64, String, u64),
InvalidArraySize(String),
}
Expand description
Possible errors encountered while hashing/encoding an EIP-712 compliant data structure
Variants
UnexpectedType(String, String)
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(String, String)
the field was declared with a unknown type
UnexpectedToken(String, String)
Unexpected token
UnsupportedArrayDepth
the user has attempted to define a typed array with a depth > 10
ValidationError(String)
FieldType validation error
UnequalArrayItems(u64, String, u64)
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
sourceimpl Fail for ErrorKind
impl Fail for ErrorKind
sourcefn cause(&self) -> Option<&dyn Fail>
fn cause(&self) -> Option<&dyn Fail>
Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the Backtrace
carried by this failure, if it
carries one. Read more
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more