[−][src]Struct ethcontract::contract::EventBuilder
A builder for creating a filtered stream of contract events that are
Fields
topics: RawTopicFilter
The topic filters that are encoded based on the event ABI.
poll_interval: Option<Duration>
The polling interval for querying the node for more events.
Methods
impl<T: Transport, E: Detokenize> EventBuilder<T, E>
[src]
pub fn new(web3: Web3<T>, event: AbiEvent, address: Address) -> Self
[src]
Creates a new event builder from a web3 provider and a contract event and address.
pub fn from_block(self, block: BlockNumber) -> Self
[src]
Sets the starting block from which to stream logs for.
If left unset defaults to the latest block.
pub fn to_block(self, block: BlockNumber) -> Self
[src]
Sets the last block from which to stream logs for.
If left unset defaults to the streaming until the end of days.
pub fn limit(self, value: usize) -> Self
[src]
Limit the number of events that can be retrieved by this filter.
Note that this parameter is non-standard.
pub fn topic0<P>(self, topic: Topic<P>) -> Self where
P: Tokenizable,
[src]
P: Tokenizable,
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]
.
pub fn topic1<P>(self, topic: Topic<P>) -> Self where
P: Tokenizable,
[src]
P: Tokenizable,
Adds a filter for the second indexed topic.
pub fn topic2<P>(self, topic: Topic<P>) -> Self where
P: Tokenizable,
[src]
P: Tokenizable,
Adds a filter for the third indexed topic.
pub fn poll_interval(self, value: Duration) -> Self
[src]
The polling interval. This is used as the interval between consecutive
eth_getFilterChanges
calls to get filter updates.
pub fn query(self) -> Result<QueryFuture<T, E>, EventError>
[src]
Returns a future that resolves with a collection of all existing logs matching the builder parameters.
pub fn stream(self) -> Result<EventStream<T, E>, EventError>
[src]
Creates an event stream from the current event builder that emits new events.
Auto Trait Implementations
impl<T, E> RefUnwindSafe for EventBuilder<T, E> where
E: RefUnwindSafe,
T: RefUnwindSafe,
E: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, E> Send for EventBuilder<T, E> where
E: Send,
T: Send,
E: Send,
T: Send,
impl<T, E> Sync for EventBuilder<T, E> where
E: Sync,
T: Sync,
E: Sync,
T: Sync,
impl<T, E> Unpin for EventBuilder<T, E> where
E: Unpin,
T: Unpin,
E: Unpin,
T: Unpin,
impl<T, E> UnwindSafe for EventBuilder<T, E> where
E: UnwindSafe,
T: UnwindSafe,
E: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,