Struct ethabi::Contract
[−]
[src]
pub struct Contract { pub constructor: Option<Constructor>, pub functions: HashMap<String, Function>, pub events: HashMap<String, Event>, pub fallback: bool, }
API building calls to contracts ABI.
Fields
constructor: Option<Constructor>
Contract constructor.
functions: HashMap<String, Function>
Contract functions.
events: HashMap<String, Event>
Contract events.
fallback: bool
Contract has fallback function.
Methods
impl Contract
[src]
fn load<T: Read>(reader: T) -> Result<Self>
[src]
Loads contract from json.
fn constructor(&self) -> Option<&Constructor>
[src]
Creates constructor call builder.
fn function(&self, name: &str) -> Result<&Function>
[src]
Creates function call builder.
fn event(&self, name: &str) -> Result<&Event>
[src]
Creates event decoder.
fn functions(&self) -> Functions
[src]
Iterate over all functions of the contract in arbitrary order.
fn events(&self) -> Events
[src]
Iterate over all events of the contract in arbitrary order.
fn fallback(&self) -> bool
[src]
Returns true if contract has fallback
Trait Implementations
impl Clone for Contract
[src]
fn clone(&self) -> Contract
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Contract
[src]
impl PartialEq for Contract
[src]
fn eq(&self, __arg_0: &Contract) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Contract) -> bool
[src]
This method tests for !=
.
impl<'a> Deserialize<'a> for Contract
[src]
fn deserialize<D>(deserializer: D) -> Result<Contract, D::Error> where
D: Deserializer<'a>,
[src]
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more