Struct ethers_contract_abigen::multi::MultiExpansion
source · pub struct MultiExpansion { /* private fields */ }
Expand description
Represents a collection of Abigen::expand()
Implementations§
source§impl MultiExpansion
impl MultiExpansion
sourcepub fn new(contracts: Vec<(ExpandedContract, Context)>) -> Self
pub fn new(contracts: Vec<(ExpandedContract, Context)>) -> Self
Create a new instance that wraps the given contracts
sourcepub fn from_abigen(abigens: impl IntoIterator<Item = Abigen>) -> Result<Self>
pub fn from_abigen(abigens: impl IntoIterator<Item = Abigen>) -> Result<Self>
Create a new instance by expanding all Abigen
elements the given iterator yields
sourcepub fn expand_inplace(self) -> TokenStream
pub fn expand_inplace(self) -> TokenStream
Expands all contracts into a single TokenStream
This will deduplicate types into a separate mod __shared_types
module, if any.
sourcepub fn expand(self) -> MultiExpansionResult
pub fn expand(self) -> MultiExpansionResult
Expands all contracts into separated TokenStream
s
If there was type deduplication, this returns a list of TokenStream
containing the type
definitions of all shared types.