pub struct RpcWithBlock<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<Params, Resp, Output, Map> RpcWithBlock<Params, Resp, Output, Map>
impl<Params, Resp, Output, Map> RpcWithBlock<Params, Resp, Output, Map>
Sourcepub fn new_rpc(inner: RpcCall<Params, Resp, Output, Map>) -> Self
pub fn new_rpc(inner: RpcCall<Params, Resp, Output, Map>) -> Self
Create a new RpcWithBlock
from a RpcCall
.
Sourcepub fn new_provider<F>(get_call: F) -> Self
pub fn new_provider<F>(get_call: F) -> Self
Create a new RpcWithBlock
from a closure producing a ProviderCall
.
Source§impl<Params, Resp, Output, Map> RpcWithBlock<Params, Resp, Output, Map>
impl<Params, Resp, Output, Map> RpcWithBlock<Params, Resp, Output, Map>
Trait Implementations§
Source§impl<Params, Resp, Output: Debug, Map> Debug for RpcWithBlock<Params, Resp, Output, Map>
impl<Params, Resp, Output: Debug, Map> Debug for RpcWithBlock<Params, Resp, Output, Map>
Source§impl<F, Params, Resp, Output, Map> From<F> for RpcWithBlock<Params, Resp, Output, Map>where
Params: RpcSend,
Resp: RpcRecv,
Map: Fn(Resp) -> Output + Clone,
F: Fn(BlockId) -> ProviderCall<ParamsWithBlock<Params>, Resp, Output, Map> + Send + 'static,
impl<F, Params, Resp, Output, Map> From<F> for RpcWithBlock<Params, Resp, Output, Map>where
Params: RpcSend,
Resp: RpcRecv,
Map: Fn(Resp) -> Output + Clone,
F: Fn(BlockId) -> ProviderCall<ParamsWithBlock<Params>, Resp, Output, Map> + Send + 'static,
Source§impl<Params, Resp, Output, Map> From<RpcCall<Params, Resp, Output, Map>> for RpcWithBlock<Params, Resp, Output, Map>
impl<Params, Resp, Output, Map> From<RpcCall<Params, Resp, Output, Map>> for RpcWithBlock<Params, Resp, Output, Map>
Source§impl<Params, Resp, Output, Map> IntoFuture for RpcWithBlock<Params, Resp, Output, Map>
impl<Params, Resp, Output, Map> IntoFuture for RpcWithBlock<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<ParamsWithBlock<Params>, Resp, Output, Map>
type IntoFuture = ProviderCall<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, Params, Resp, Output, Map> Unpin for RpcWithBlock<Params, Resp, Output, Map>
Auto Trait Implementations§
impl<Params, Resp, Output, Map> Freeze for RpcWithBlock<Params, Resp, Output, Map>
impl<Params, Resp, Output = Resp, Map = fn(_: Resp) -> Output> !RefUnwindSafe for RpcWithBlock<Params, Resp, Output, Map>
impl<Params, Resp, Output, Map> Send for RpcWithBlock<Params, Resp, Output, Map>where
Map: Send,
impl<Params, Resp, Output = Resp, Map = fn(_: Resp) -> Output> !Sync for RpcWithBlock<Params, Resp, Output, Map>
impl<Params, Resp, Output = Resp, Map = fn(_: Resp) -> Output> !UnwindSafe for RpcWithBlock<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 moreSource§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for T
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.