Type Alias BlockchainWriteHandle

Source
pub type BlockchainWriteHandle = DatabaseWriteHandle<BlockchainWriteRequest, BlockchainResponse>;
Expand description

The blockchain database write service.

Aliased Type§

struct BlockchainWriteHandle { /* 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: 16 bytes

Implementations

Source§

impl<Req, Res> DatabaseWriteHandle<Req, Res>
where Req: Send + 'static, Res: Debug + Send + 'static,

Source

pub fn init( env: Arc<ConcreteEnv>, inner_handler: impl Fn(&ConcreteEnv, &Req) -> Result<Res, RuntimeError> + Send + 'static, ) -> DatabaseWriteHandle<Req, Res>

Initialize the single DatabaseWriter thread.

Trait Implementations

Source§

impl<Req, Res> Clone for DatabaseWriteHandle<Req, Res>

Source§

fn clone(&self) -> DatabaseWriteHandle<Req, Res>

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<Req, Res> Debug for DatabaseWriteHandle<Req, Res>
where Req: Debug, Res: Debug,

Source§

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

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

impl<Req, Res> Service<Req> for DatabaseWriteHandle<Req, Res>

Source§

type Response = Res

Responses given by the service.
Source§

type Error = RuntimeError

Errors produced by the service.
Source§

type Future = InfallibleOneshotReceiver<Result<Res, RuntimeError>>

The future response value.
Source§

fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), RuntimeError>>

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

fn call( &mut self, request: Req, ) -> <DatabaseWriteHandle<Req, Res> as Service<Req>>::Future

Process the request and return the response asynchronously. Read more