Struct ethcontract::contract::EventBuilder [−][src]
pub struct EventBuilder<T: Transport, E: Tokenize> { pub filter: LogFilterBuilder<T>, pub topics: RawTopicFilter, // some fields omitted }
Expand description
A builder for creating a filtered stream of contract events that are
Fields
filter: LogFilterBuilder<T>
The web3 filter builder used for creating a log filter.
topics: RawTopicFilter
The topic filters that are encoded based on the event ABI.
Implementations
Creates a new event builder from a web3 provider and a contract event 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.
This corresponds to the first indexed property, which for anonymous
events corresponds to topic[0]
in the log, and for named events is
actually topic[1]
.
Adds a filter for the second indexed topic.
Adds a filter for the third indexed topic.
Limit the number of events that can be retrieved by this filter.
Note that this parameter is non-standard.
The polling interval. This is used as the interval between consecutive
eth_getFilterChanges
calls to get filter updates.
Returns a LogFilterBuilder
instance for the current builder.
Returns a future that resolves with a collection of all existing logs matching the builder parameters.
Creates an event stream from the current event builder that emits new events.
Trait Implementations
Auto Trait Implementations
impl<T, E> RefUnwindSafe for EventBuilder<T, E> where
E: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, E> Send for EventBuilder<T, E> where
E: Send,
T: Send,
impl<T, E> Sync for EventBuilder<T, E> where
E: Sync,
T: Sync,
impl<T, E> Unpin for EventBuilder<T, E> where
E: Unpin,
T: Unpin,
impl<T, E> UnwindSafe for EventBuilder<T, E> where
E: UnwindSafe,
T: UnwindSafe,