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 ABI 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).

Expand a script into type-safe Rust bindings based on its ABI. See expand_contract for more details.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more