Struct ethcontract::contract::AllEventsBuilder [−][src]
#[must_use = "event builders do nothing unless you stream them"]pub struct AllEventsBuilder<T: Transport, E: ParseLog> { pub filter: LogFilterBuilder<T>, pub deployment_information: Option<DeploymentInformation>, // some fields omitted }
Expand description
A builder for creating a filtered stream for any contract event.
Fields
filter: LogFilterBuilder<T>
The underlying log filter for these contract events.
deployment_information: Option<DeploymentInformation>
The contract deployment transaction hash. Specifying this can increase the performance of the paginated events query.
Note that if the contract was created from an existing deployment that includes the transaction hash, then this property will be automatically set.
Implementations
Creates a new all events builder from a web3 provider and and address.
Sets the starting block from which to stream logs for.
If left unset defaults to the latest block.
Sets the last block from which to stream logs for.
If left unset defaults to the streaming until the end of days.
Adds a filter for the first indexed topic.
For regular events, this corresponds to the event signature. For anonymous events, this is the first indexed property.
Limit the number of events that can be retrieved by this filter.
Note that this parameter is non-standard.
The page size in blocks to use when doing a paginated query on past events.
The polling interval. This is used as the interval between consecutive
eth_getLogs
calls to get log updates.
Returns a future that resolves into a collection of events matching the event builder’s parameters.
pub async fn query_paginated(
self
) -> Result<impl Stream<Item = Result<Event<E>, ExecutionError>>, ExecutionError>
[src]
pub async fn query_paginated(
self
) -> Result<impl Stream<Item = Result<Event<E>, ExecutionError>>, ExecutionError>
[src]Returns a future that resolves into a collection of events matching the
event builder’s parameters. This method is similar to query
with the
notable difference that the logs are fetched in pages by querying
smaller block ranges specified by block_page_size
instead of using a
single query.
Note that if the block range is inconsistent (for example from block is after the to block, or querying until the earliest block), then the query will be forwarded to the node as is.
Creates an event stream from the current event builder.
Trait Implementations
Auto Trait Implementations
impl<T, E> RefUnwindSafe for AllEventsBuilder<T, E> where
E: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, E> Send for AllEventsBuilder<T, E> where
E: Send,
T: Send,
impl<T, E> Sync for AllEventsBuilder<T, E> where
E: Sync,
T: Sync,
impl<T, E> Unpin for AllEventsBuilder<T, E> where
E: Unpin,
T: Unpin,
impl<T, E> UnwindSafe for AllEventsBuilder<T, E> where
E: UnwindSafe,
T: UnwindSafe,