pub struct TraceBuilder<Params, Resp, Output = Resp, Map = fn(Resp) -> Output>{ /* private fields */ }
Available on crate feature
trace-api
only.Expand description
A builder for trace_* api calls.
Implementations§
Source§impl<Params, Resp, Output, Map> TraceBuilder<Params, Resp, Output, Map>
impl<Params, Resp, Output, Map> TraceBuilder<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 TraceBuilder
from a RpcCall
.
Sourcepub fn new_provider<F>(get_call: F) -> Selfwhere
F: Fn(Option<BlockId>) -> ProviderCall<TraceParams<Params>, Resp, Output, Map> + Send + 'static,
pub fn new_provider<F>(get_call: F) -> Selfwhere
F: Fn(Option<BlockId>) -> ProviderCall<TraceParams<Params>, Resp, Output, Map> + Send + 'static,
Create a new TraceBuilder
from a closure producing a ProviderCall
.
Source§impl<Params, Resp, Output, Map> TraceBuilder<Params, Resp, Output, Map>
impl<Params, Resp, Output, Map> TraceBuilder<Params, Resp, Output, Map>
Sourcepub fn trace_type(self, trace_type: TraceType) -> Self
pub fn trace_type(self, trace_type: TraceType) -> Self
Set the trace type.
Sourcepub fn trace_types<I: IntoIterator<Item = TraceType>>(
self,
trace_types: I,
) -> Self
pub fn trace_types<I: IntoIterator<Item = TraceType>>( self, trace_types: I, ) -> Self
Set the trace types.
Sourcepub fn state_diff(self) -> Self
pub fn state_diff(self) -> Self
Set the trace type to “stateDiff”.
Sourcepub const fn get_trace_types(&self) -> Option<&HashSet<TraceType>>
pub const fn get_trace_types(&self) -> Option<&HashSet<TraceType>>
Get the trace types.
Sourcepub const fn hash(self, hash: B256) -> Self
pub const fn hash(self, hash: B256) -> Self
Set the block id to a specific hash, without requiring the hash be part of the canonical chain.
Sourcepub const fn hash_canonical(self, hash: B256) -> Self
pub const fn hash_canonical(self, hash: B256) -> Self
Set the block id to a specific hash and require the hash be part of the canonical chain.
Trait Implementations§
Source§impl<Params, Resp, Output: Debug, Map> Debug for TraceBuilder<Params, Resp, Output, Map>
impl<Params, Resp, Output: Debug, Map> Debug for TraceBuilder<Params, Resp, Output, Map>
Source§impl<F, Params, Resp, Output, Map> From<F> for TraceBuilder<Params, Resp, Output, Map>where
Params: RpcSend,
Resp: RpcRecv,
Map: Fn(Resp) -> Output + Clone,
F: Fn(Option<BlockId>) -> ProviderCall<TraceParams<Params>, Resp, Output, Map> + Send + 'static,
impl<F, Params, Resp, Output, Map> From<F> for TraceBuilder<Params, Resp, Output, Map>where
Params: RpcSend,
Resp: RpcRecv,
Map: Fn(Resp) -> Output + Clone,
F: Fn(Option<BlockId>) -> ProviderCall<TraceParams<Params>, Resp, Output, Map> + Send + 'static,
Source§impl<Params, Resp, Output, Map> From<RpcCall<Params, Resp, Output, Map>> for TraceBuilder<Params, Resp, Output, Map>
impl<Params, Resp, Output, Map> From<RpcCall<Params, Resp, Output, Map>> for TraceBuilder<Params, Resp, Output, Map>
Source§impl<Params, Resp, Output, Map> IntoFuture for TraceBuilder<Params, Resp, Output, Map>
impl<Params, Resp, Output, Map> IntoFuture for TraceBuilder<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<TraceParams<Params>, Resp, Output, Map>
type IntoFuture = ProviderCall<TraceParams<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
Auto Trait Implementations§
impl<Params, Resp, Output, Map> Freeze for TraceBuilder<Params, Resp, Output, Map>
impl<Params, Resp, Output = Resp, Map = fn(_: Resp) -> Output> !RefUnwindSafe for TraceBuilder<Params, Resp, Output, Map>
impl<Params, Resp, Output, Map> Send for TraceBuilder<Params, Resp, Output, Map>where
Map: Send,
impl<Params, Resp, Output = Resp, Map = fn(_: Resp) -> Output> !Sync for TraceBuilder<Params, Resp, Output, Map>
impl<Params, Resp, Output, Map> Unpin for TraceBuilder<Params, Resp, Output, Map>
impl<Params, Resp, Output = Resp, Map = fn(_: Resp) -> Output> !UnwindSafe for TraceBuilder<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.