[−][src]Struct ethabi::Contract
API building calls to contracts ABI.
Fields
constructor: Option<Constructor>
Contract constructor.
functions: HashMap<String, Function>
Contract functions.
events: HashMap<String, Vec<Event>>
Contract events, maps signature to event.
fallback: bool
Contract has fallback function.
Methods
impl Contract
[src]
pub fn load<T: Read>(reader: T) -> Result<Self>
[src]
Loads contract from json.
pub fn constructor(&self) -> Option<&Constructor>
[src]
Creates constructor call builder.
pub fn function(&self, name: &str) -> Result<&Function>
[src]
Creates function call builder.
pub fn event(&self, name: &str) -> Result<&Event>
[src]
Get the contract event named name
, the first if there are multiple.
pub fn events_by_name(&self, name: &str) -> Result<&Vec<Event>>
[src]
Get all contract events named name
.
ⓘImportant traits for Functions<'a>pub fn functions(&self) -> Functions
[src]
ⓘImportant traits for Functions<'a>
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>
Iterate over all events of the contract in arbitrary order.
pub fn fallback(&self) -> bool
[src]
Returns true if contract has fallback
Trait Implementations
impl Clone for Contract
[src]
fn clone(&self) -> Contract
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Contract> for Contract
[src]
impl Debug for Contract
[src]
impl<'a> Deserialize<'a> for Contract
[src]
fn deserialize<D>(deserializer: D) -> Result<Contract, D::Error> where
D: Deserializer<'a>,
[src]
D: Deserializer<'a>,
Auto Trait Implementations
impl Sync for Contract
impl Send for Contract
impl Unpin for Contract
impl RefUnwindSafe for Contract
impl UnwindSafe for Contract
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,