pub struct RpcWithBlock<T, Params, Resp, Output = Resp, Map = fn(_: Resp) -> Output>{ /* private fields */ }
Expand description
A struct that takes an optional BlockId
parameter.
This resolves to a ProviderCall
that will execute the call on the specified block.
By default this will use “latest”.
Implementations§
source§impl<T, Params, Resp, Output, Map> RpcWithBlock<T, Params, Resp, Output, Map>
impl<T, Params, Resp, Output, Map> RpcWithBlock<T, Params, Resp, Output, Map>
sourcepub fn new_rpc(inner: RpcCall<T, Params, Resp, Output, Map>) -> Self
pub fn new_rpc(inner: RpcCall<T, Params, Resp, Output, Map>) -> Self
Create a new RpcWithBlock
from a RpcCall
.
sourcepub fn new_provider<F>(get_call: F) -> Selfwhere
F: Fn(BlockId) -> ProviderCall<T, ParamsWithBlock<Params>, Resp, Output, Map> + Send + 'static,
pub fn new_provider<F>(get_call: F) -> Selfwhere
F: Fn(BlockId) -> ProviderCall<T, ParamsWithBlock<Params>, Resp, Output, Map> + Send + 'static,
Create a new RpcWithBlock
from a closure producing a ProviderCall
.
source§impl<T, Params, Resp, Output, Map> RpcWithBlock<T, Params, Resp, Output, Map>
impl<T, Params, Resp, Output, Map> RpcWithBlock<T, Params, Resp, Output, Map>
Trait Implementations§
source§impl<T, Params, Resp, Output: Debug, Map> Debug for RpcWithBlock<T, Params, Resp, Output, Map>
impl<T, Params, Resp, Output: Debug, Map> Debug for RpcWithBlock<T, Params, Resp, Output, Map>
source§impl<F, T, Params, Resp, Output, Map> From<F> for RpcWithBlock<T, Params, Resp, Output, Map>
impl<F, T, Params, Resp, Output, Map> From<F> for RpcWithBlock<T, Params, Resp, Output, Map>
source§impl<T, Params, Resp, Output, Map> From<RpcCall<T, Params, Resp, Output, Map>> for RpcWithBlock<T, Params, Resp, Output, Map>
impl<T, Params, Resp, Output, Map> From<RpcCall<T, Params, Resp, Output, Map>> for RpcWithBlock<T, Params, Resp, Output, Map>
source§impl<T, Params, Resp, Output, Map> IntoFuture for RpcWithBlock<T, Params, Resp, Output, Map>
impl<T, Params, Resp, Output, Map> IntoFuture for RpcWithBlock<T, Params, Resp, Output, Map>
source§type Output = Result<Output, RpcError<TransportErrorKind>>
type Output = Result<Output, RpcError<TransportErrorKind>>
The output that the future will produce on completion.
source§type IntoFuture = ProviderCall<T, ParamsWithBlock<Params>, Resp, Output, Map>
type IntoFuture = ProviderCall<T, ParamsWithBlock<Params>, Resp, Output, Map>
Which kind of future are we turning this into?
source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
impl<'pin, T, Params, Resp, Output, Map> Unpin for RpcWithBlock<T, Params, Resp, Output, Map>
Auto Trait Implementations§
impl<T, Params, Resp, Output, Map> Freeze for RpcWithBlock<T, Params, Resp, Output, Map>
impl<T, Params, Resp, Output = Resp, Map = fn(_: Resp) -> Output> !RefUnwindSafe for RpcWithBlock<T, Params, Resp, Output, Map>
impl<T, Params, Resp, Output, Map> Send for RpcWithBlock<T, Params, Resp, Output, Map>where
Map: Send,
impl<T, Params, Resp, Output = Resp, Map = fn(_: Resp) -> Output> !Sync for RpcWithBlock<T, Params, Resp, Output, Map>
impl<T, Params, Resp, Output = Resp, Map = fn(_: Resp) -> Output> !UnwindSafe for RpcWithBlock<T, Params, Resp, Output, Map>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§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