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]
impl Contract
pub fn load<T: Read>(reader: T) -> Result<Self>
[src]
pub fn load<T: Read>(reader: T) -> Result<Self>
Loads contract from json.
pub fn constructor(&self) -> Option<&Constructor>
[src]
pub fn constructor(&self) -> Option<&Constructor>
Creates constructor call builder.
pub fn function(&self, name: &str) -> Result<&Function>
[src]
pub fn function(&self, name: &str) -> Result<&Function>
Creates function call builder.
pub fn event(&self, name: &str) -> Result<&Event>
[src]
pub fn event(&self, name: &str) -> Result<&Event>
Creates event decoder.
ⓘImportant traits for Functions<'a>pub fn functions(&self) -> Functions
[src]
ⓘImportant traits for Functions<'a>
pub fn functions(&self) -> Functions
Iterate over all functions of the contract in arbitrary order.
ⓘImportant traits for Events<'a>pub fn events(&self) -> Events
[src]
ⓘImportant traits for Events<'a>
pub fn events(&self) -> Events
Iterate over all events of the contract in arbitrary order.
pub fn fallback(&self) -> bool
[src]
pub fn fallback(&self) -> bool
Returns true if contract has fallback
Trait Implementations
impl Clone for Contract
[src]
impl Clone for Contract
fn clone(&self) -> Contract
[src]
fn clone(&self) -> Contract
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Contract
[src]
impl Debug for Contract
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Contract
[src]
impl PartialEq for Contract
fn eq(&self, other: &Contract) -> bool
[src]
fn eq(&self, other: &Contract) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Contract) -> bool
[src]
fn ne(&self, other: &Contract) -> bool
This method tests for !=
.
impl<'a> Deserialize<'a> for Contract
[src]
impl<'a> Deserialize<'a> for Contract
fn deserialize<D>(deserializer: D) -> Result<Contract, D::Error> where
D: Deserializer<'a>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Contract, D::Error> where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more