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 Contractpub 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) -> FunctionsIterate 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) -> EventsIterate over all events of the contract in arbitrary order.
pub fn fallback(&self) -> bool[src]
pub fn fallback(&self) -> boolReturns true if contract has fallback
Trait Implementations
impl Clone for Contract[src]
impl Clone for Contractfn clone(&self) -> Contract[src]
fn clone(&self) -> ContractReturns 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 Contractfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for Contract[src]
impl PartialEq for Contractfn eq(&self, other: &Contract) -> bool[src]
fn eq(&self, other: &Contract) -> boolThis 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) -> boolThis method tests for !=.
impl<'a> Deserialize<'a> for Contract[src]
impl<'a> Deserialize<'a> for Contractfn 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