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: FilterThe 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
Sets the filter’s 3rd topic
pub async fn stream(
&'a self
) -> Result<EventStream<'a, FilterWatcher<'a, M::Provider, Log>, D, ContractError<M>>, ContractError<M>>
pub async fn stream(
&'a self
) -> Result<EventStream<'a, FilterWatcher<'a, M::Provider, Log>, D, ContractError<M>>, ContractError<M>>
Returns a stream for the event
impl<'a, M, D> Event<'a, M, D> where
M: Middleware,
<M as Middleware>::Provider: PubsubClient,
D: EthLogDecode,
impl<'a, M, D> Event<'a, M, D> where
M: Middleware,
<M as Middleware>::Provider: PubsubClient,
D: EthLogDecode,
pub async fn subscribe(
&'a self
) -> Result<EventStream<'a, SubscriptionStream<'a, M::Provider, Log>, D, ContractError<M>>, ContractError<M>>
pub async fn subscribe(
&'a self
) -> Result<EventStream<'a, SubscriptionStream<'a, M::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