Struct ethers_contract_abigen::contract::Context
source · [−]pub struct Context { /* private fields */ }
Expand description
Internal shared context for generating smart contract bindings.
Implementations
sourceimpl Context
impl Context
sourcepub fn events_declaration(&self) -> Result<TokenStream>
pub fn events_declaration(&self) -> Result<TokenStream>
Expands each event to a struct + its impl Detokenize block
sourcepub fn event_methods(&self) -> Result<TokenStream>
pub fn event_methods(&self) -> Result<TokenStream>
Generate the event filter methods for the contract
sourceimpl Context
impl Context
sourcepub fn abi_structs(&self) -> Result<TokenStream>
pub fn abi_structs(&self) -> Result<TokenStream>
Generate corresponding types for structs parsed from a human readable ABI
NOTE: This assumes that all structs that are potentially used as type for variable are
in fact present in the AbiParser
, this is sound because AbiParser::parse
would have
failed already
sourcepub fn remove_struct(&mut self, name: &str)
pub fn remove_struct(&mut self, name: &str)
In the event of type conflicts this allows for removing a specific struct type.
sourcepub fn struct_definition(&mut self, name: &str) -> Result<TokenStream>
pub fn struct_definition(&mut self, name: &str) -> Result<TokenStream>
Returns the type definition for the struct with the given name
sourceimpl Context
impl Context
sourcepub fn expand(&self) -> Result<ExpandedContract>
pub fn expand(&self) -> Result<ExpandedContract>
Expands the whole rust contract
sourcepub fn from_abigen(args: Abigen) -> Result<Self>
pub fn from_abigen(args: Abigen) -> Result<Self>
Create a context from the code generation arguments.
sourcepub fn internal_structs(&self) -> &InternalStructs
pub fn internal_structs(&self) -> &InternalStructs
The internal abi struct mapping table
sourcepub fn internal_structs_mut(&mut self) -> &mut InternalStructs
pub fn internal_structs_mut(&mut self) -> &mut InternalStructs
The internal mutable abi struct mapping table
Auto Trait Implementations
impl RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more