pub struct EventScanner<M = Unspecified, N: Network = Ethereum> { /* private fields */ }Implementations§
Source§impl<N: Network> EventScanner<Historic, N>
impl<N: Network> EventScanner<Historic, N>
Sourcepub async fn start(self) -> Result<(), ScannerError>
pub async fn start(self) -> Result<(), ScannerError>
Starts the scanner.
§Important notes
- Register event streams via
scanner.subscribe(filter)before calling this function. - The method returns immediately; events are delivered asynchronously.
§Errors
Can error out if the service fails to start.
Source§impl<N: Network> EventScanner<LatestEvents, N>
impl<N: Network> EventScanner<LatestEvents, N>
Sourcepub async fn start(self) -> Result<(), ScannerError>
pub async fn start(self) -> Result<(), ScannerError>
Starts the scanner.
§Important notes
- Register event streams via
scanner.subscribe(filter)before calling this function. - The method returns immediately; events are delivered asynchronously.
§Errors
Can error out if the service fails to start.
Source§impl<N: Network> EventScanner<Live, N>
impl<N: Network> EventScanner<Live, N>
Sourcepub async fn start(self) -> Result<(), ScannerError>
pub async fn start(self) -> Result<(), ScannerError>
Starts the scanner.
§Important notes
- Register event streams via
scanner.subscribe(filter)before calling this function. - The method returns immediately; events are delivered asynchronously.
§Errors
Can error out if the service fails to start.
Source§impl<N: Network> EventScanner<SyncFromBlock, N>
impl<N: Network> EventScanner<SyncFromBlock, N>
Sourcepub async fn start(self) -> Result<(), ScannerError>
pub async fn start(self) -> Result<(), ScannerError>
Starts the scanner.
§Important notes
- Register event streams via
scanner.subscribe(filter)before calling this function. - The method returns immediately; events are delivered asynchronously.
§Errors
Can error out if the service fails to start.
Source§impl<N: Network> EventScanner<SyncFromLatestEvents, N>
impl<N: Network> EventScanner<SyncFromLatestEvents, N>
Sourcepub async fn start(self) -> Result<(), ScannerError>
pub async fn start(self) -> Result<(), ScannerError>
Starts the scanner.
§Important notes
- Register event streams via
scanner.subscribe(filter)before calling this function. - The method returns immediately; events are delivered asynchronously.
§Errors
Can error out if the service fails to start.
Source§impl<M, N: Network> EventScanner<M, N>
impl<M, N: Network> EventScanner<M, N>
pub fn subscribe( &mut self, filter: EventFilter, ) -> ReceiverStream<EventScannerResult>
Auto Trait Implementations§
impl<M, N> Freeze for EventScanner<M, N>where
M: Freeze,
impl<M = Unspecified, N = Ethereum> !RefUnwindSafe for EventScanner<M, N>
impl<M, N> Send for EventScanner<M, N>where
M: Send,
impl<M, N> Sync for EventScanner<M, N>where
M: Sync,
impl<M, N> Unpin for EventScanner<M, N>where
M: Unpin,
impl<M = Unspecified, N = Ethereum> !UnwindSafe for EventScanner<M, N>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more