pub struct Types {
pub eip712_domain: TypeDefinition,
pub types: BTreeMap<StructName, TypeDefinition>,
}Fields§
§eip712_domain: TypeDefinition§types: BTreeMap<StructName, TypeDefinition>Implementations§
Source§impl Types
impl Types
pub fn get(&self, struct_name: &str) -> Option<&TypeDefinition>
Sourcepub fn generate(
doc: &Value,
primary_type: StructName,
domain_type: TypeDefinition,
) -> Result<Self, TypesGenerationError>
pub fn generate( doc: &Value, primary_type: StructName, domain_type: TypeDefinition, ) -> Result<Self, TypesGenerationError>
Generate EIP-712 types from a value.
See: https://w3c-ccg.github.io/ethereum-eip712-signature-2021-spec/#types-generation
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Types
impl<'de> Deserialize<'de> for Types
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Types
impl Ord for Types
Source§impl PartialOrd for Types
impl PartialOrd for Types
impl Eq for Types
impl StructuralPartialEq for Types
Auto Trait Implementations§
impl Freeze for Types
impl RefUnwindSafe for Types
impl Send for Types
impl Sync for Types
impl Unpin for Types
impl UnwindSafe for Types
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.