[−][src]Struct ethers_contract::builders::Event
Helper for managing the event filter before querying or streaming its logs
Fields
filter: FilterThe event filter's state
event: &'b AbiEventThe ABI of the event which is being filtered
Implementations
impl<'_, '_, P, D: Detokenize> Event<'_, '_, P, D>[src]
pub fn from_block<T: Into<BlockNumber>>(self, block: T) -> Self[src]
Sets the filter's from block
pub fn to_block<T: Into<BlockNumber>>(self, block: T) -> Self[src]
Sets the filter's to block
pub fn topic0<T: Into<ValueOrArray<H256>>>(self, topic: T) -> Self[src]
Sets the filter's 0th topic (typically the event name for non-anonymous events)
pub fn topic1<T: Into<ValueOrArray<H256>>>(self, topic: T) -> Self[src]
Sets the filter's 1st topic
pub fn topic2<T: Into<ValueOrArray<H256>>>(self, topic: T) -> Self[src]
Sets the filter's 2nd topic
pub fn topic3<T: Into<ValueOrArray<H256>>>(self, topic: T) -> Self[src]
Sets the filter's 3rd topic
impl<'a, 'b, P, D> Event<'a, 'b, P, D> where
P: JsonRpcClient,
D: 'b + Detokenize + Clone,
'a: 'b, [src]
P: JsonRpcClient,
D: 'b + Detokenize + Clone,
'a: 'b,
pub async fn stream(
self
) -> Result<impl Stream<Item = Result<D, ContractError>> + 'b, ContractError>[src]
self
) -> Result<impl Stream<Item = Result<D, ContractError>> + 'b, ContractError>
Returns a stream for the event
impl<'_, '_, P, D> Event<'_, '_, P, D> where
P: JsonRpcClient,
D: Detokenize + Clone, [src]
P: JsonRpcClient,
D: Detokenize + Clone,
pub async fn query<'_>(&'_ self) -> Result<Vec<D>, ContractError>[src]
Queries the blockchain for the selected filter and returns a vector of matching event logs
pub async fn query_with_hashes<'_>(
&'_ self
) -> Result<HashMap<H256, D>, ContractError>[src]
&'_ self
) -> Result<HashMap<H256, D>, ContractError>
Queries the blockchain for the selected filter and returns a hashmap of txhash -> logs
Auto Trait Implementations
impl<'a, 'b, P, D> RefUnwindSafe for Event<'a, 'b, P, D> where
D: RefUnwindSafe,
P: RefUnwindSafe,
D: RefUnwindSafe,
P: RefUnwindSafe,
impl<'a, 'b, P, D> Send for Event<'a, 'b, P, D> where
D: Send,
P: Sync,
D: Send,
P: Sync,
impl<'a, 'b, P, D> Sync for Event<'a, 'b, P, D> where
D: Sync,
P: Sync,
D: Sync,
P: Sync,
impl<'a, 'b, P, D> Unpin for Event<'a, 'b, P, D> where
D: Unpin,
D: Unpin,
impl<'a, 'b, P, D> UnwindSafe for Event<'a, 'b, P, D> where
D: UnwindSafe,
P: RefUnwindSafe,
D: UnwindSafe,
P: RefUnwindSafe,
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> Same<T> for T
type Output = T
Should always be Self
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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,