Struct ethabi::Contract [−][src]
API building calls to contracts ABI.
Fields
constructor: Option<Constructor>
Contract constructor.
functions: HashMap<String, Vec<Function>>
Contract functions.
events: HashMap<String, Vec<Event>>
Contract events, maps signature to event.
fallback: bool
Contract has fallback function.
Implementations
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]
Get the function named name
, the first if there are overloaded
versions of the same function.
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
.
pub fn functions_by_name(&self, name: &str) -> Result<&Vec<Function>>
[src]
Get all functions named name
.
pub fn functions(&self) -> Functions<'_>ⓘ
[src]
Iterate over all functions of the contract in arbitrary order.
pub fn events(&self) -> Events<'_>ⓘ
[src]
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]
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>,
impl PartialEq<Contract> for Contract
[src]
impl StructuralPartialEq for Contract
[src]
Auto Trait Implementations
impl RefUnwindSafe for Contract
impl Send for Contract
impl Sync for Contract
impl Unpin for Contract
impl UnwindSafe for Contract
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,