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

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.