pub struct Abigen { /* private fields */ }

Implementations

Creates a new contract with the given ABI JSON source.

Generates the contract bindings.

Entry point of the Abigen’s expansion logic. The high-level goal of this function is to expand* a contract defined as a JSON into type-safe bindings of that contract that can be used after it is brought into scope after a successful generation.

*: To expand, in procedural macro terms, means to automatically generate Rust code after a transformation of TokenStream to another set of TokenStream. This generated Rust code is the brought into scope after it is called through a procedural macro (abigen!() in our case).

Reads the parsed ABI and returns all the types in it.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.