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.
Auto Trait Implementations§
impl RefUnwindSafe for MultiExpansion
impl !Send for MultiExpansion
impl !Sync for MultiExpansion
impl Unpin for MultiExpansion
impl UnwindSafe for MultiExpansion
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more