Struct ethers::contract::builders::Event [−][src]
pub struct Event<'a, M, D> {
pub filter: Filter,
// some fields omitted
}
Expand description
Helper for managing the event filter before querying or streaming its logs
Fields
filter: Filter
The event filter’s state
Implementations
Sets the filter’s from
block
Sets the filter’s to
block
Sets the filter’s blockHash
. Setting this will override previously
set from_block
and to_block
fields.
Sets the filter’s 0th topic (typically the event name for non-anonymous events)
Sets the filter’s 1st topic
Sets the filter’s 2nd topic
pub async fn stream(
&'a self
) -> Result<EventStream<'a, FilterWatcher<'a, <M as Middleware>::Provider, Log>, D, ContractError<M>>, ContractError<M>>
pub async fn stream(
&'a self
) -> Result<EventStream<'a, FilterWatcher<'a, <M as Middleware>::Provider, Log>, D, ContractError<M>>, ContractError<M>>
Returns a stream for the event
impl<'a, M, D> Event<'a, M, D> where
M: Middleware,
D: EthLogDecode,
<M as Middleware>::Provider: PubsubClient,
impl<'a, M, D> Event<'a, M, D> where
M: Middleware,
D: EthLogDecode,
<M as Middleware>::Provider: PubsubClient,
pub async fn subscribe(
&'a self
) -> Result<EventStream<'a, SubscriptionStream<'a, <M as Middleware>::Provider, Log>, D, ContractError<M>>, ContractError<M>>
pub async fn subscribe(
&'a self
) -> Result<EventStream<'a, SubscriptionStream<'a, <M as Middleware>::Provider, Log>, D, ContractError<M>>, ContractError<M>>
Returns a subscription for the event
Queries the blockchain for the selected filter and returns a vector of matching event logs
Queries the blockchain for the selected filter and returns a vector of logs along with their metadata
Trait Implementations
Auto Trait Implementations
impl<'a, M, D> RefUnwindSafe for Event<'a, M, D> where
D: RefUnwindSafe,
M: RefUnwindSafe,
impl<'a, M, D> UnwindSafe for Event<'a, M, D> where
D: UnwindSafe,
M: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
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