Type Alias ConsensusBlockchainReadHandle

Source
pub type ConsensusBlockchainReadHandle = MapErr<BlockchainReadHandle, fn(RuntimeError) -> BoxError>;
Expand description

The BlockchainReadHandle with the tower::Service::Error mapped to conform to what the consensus crate requires.

Aliased Type§

struct ConsensusBlockchainReadHandle { /* private fields */ }

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 32 bytes

Implementations

Source§

impl<S, F> MapErr<S, F>

Source

pub const fn new(inner: S, f: F) -> MapErr<S, F>

Creates a new MapErr service.

Source

pub fn layer(f: F) -> MapErrLayer<F>

Returns a new Layer that produces MapErr services.

This is a convenience function that simply calls MapErrLayer::new.

Trait Implementations

Source§

impl<S, F> Clone for MapErr<S, F>
where S: Clone, F: Clone,

Source§

fn clone(&self) -> MapErr<S, F>

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<S, F> Debug for MapErr<S, F>
where S: Debug,

Source§

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

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

impl<S, F, Request, Error> Service<Request> for MapErr<S, F>
where S: Service<Request>, F: FnOnce(<S as Service<Request>>::Error) -> Error + Clone,

Source§

type Response = <S as Service<Request>>::Response

Responses given by the service.
Source§

type Error = Error

Errors produced by the service.
Source§

type Future = MapErrFuture<<S as Service<Request>>::Future, F>

The future response value.
Source§

fn poll_ready( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<(), <MapErr<S, F> as Service<Request>>::Error>>

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

fn call( &mut self, request: Request, ) -> <MapErr<S, F> as Service<Request>>::Future

Process the request and return the response asynchronously. Read more