Type Alias State

Source
pub type State = ReadStateService;
Expand description

The read state type used by the scanner.

Aliased Type§

struct State { /* private fields */ }

Implementations

Source§

impl ReadStateService

Source

pub fn best_tip(&self) -> Option<(Height, Hash)>

Return the tip of the current best chain.

Source

pub fn db(&self) -> &ZebraDb

Test-only access to the inner database. Can be used to modify the database without doing any consensus checks.

Source

pub fn log_db_metrics(&self)

Logs rocksdb metrics using the read only state service.

Trait Implementations

Source§

impl Clone for ReadStateService

Source§

fn clone(&self) -> ReadStateService

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ReadStateService

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Drop for ReadStateService

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Service<ReadRequest> for ReadStateService

Source§

type Response = ReadResponse

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = Pin<Box<dyn Future<Output = Result<<ReadStateService as Service<ReadRequest>>::Response, <ReadStateService as Service<ReadRequest>>::Error>> + Send>>

The future response value.
Source§

fn poll_ready( &mut self, _: &mut Context<'_>, ) -> Poll<Result<(), <ReadStateService as Service<ReadRequest>>::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call( &mut self, req: ReadRequest, ) -> <ReadStateService as Service<ReadRequest>>::Future

Process the request and return the response asynchronously. Read more