pub struct FetchFullBlockRangeFuture<Client>where
Client: BlockClient,{ /* private fields */ }Expand description
A future that downloads a range of full blocks from the network.
This first fetches the headers for the given range using the inner Client. Once the request
is complete, it will fetch the bodies for the headers it received.
Once the bodies request completes, the [SealedBlock]s will be assembled and the future will
yield the full block range.
The full block range will be returned with falling block numbers, i.e. in descending order.
NOTE: this assumes that bodies responses are returned by the client in the same order as the hash array used to request them.
Implementations§
Source§impl<Client> FetchFullBlockRangeFuture<Client>
impl<Client> FetchFullBlockRangeFuture<Client>
Sourcepub const fn start_hash(&self) -> B256
pub const fn start_hash(&self) -> B256
Returns the start hash for the request
Trait Implementations§
Source§impl<Client> Future for FetchFullBlockRangeFuture<Client>
impl<Client> Future for FetchFullBlockRangeFuture<Client>
Auto Trait Implementations§
impl<Client> !RefUnwindSafe for FetchFullBlockRangeFuture<Client>
impl<Client> !UnwindSafe for FetchFullBlockRangeFuture<Client>
impl<Client> Freeze for FetchFullBlockRangeFuture<Client>where
Client: Freeze,
Arc<dyn Consensus<<Client as BlockClient>::Block>>: Freeze,
FullBlockRangeRequest<Client>: Freeze,
Option<Vec<SealedHeader<<Client as HeadersClient>::Header>>>: Freeze,
VecDeque<SealedHeader<<Client as HeadersClient>::Header>>: Freeze,
HashMap<SealedHeader<<Client as HeadersClient>::Header>, BodyResponse<<Client as BodiesClient>::Body>>: Freeze,
impl<Client> Send for FetchFullBlockRangeFuture<Client>where
Arc<dyn Consensus<<Client as BlockClient>::Block>>: Send,
FullBlockRangeRequest<Client>: Send,
Option<Vec<SealedHeader<<Client as HeadersClient>::Header>>>: Send,
VecDeque<SealedHeader<<Client as HeadersClient>::Header>>: Send,
HashMap<SealedHeader<<Client as HeadersClient>::Header>, BodyResponse<<Client as BodiesClient>::Body>>: Send,
impl<Client> Sync for FetchFullBlockRangeFuture<Client>where
Arc<dyn Consensus<<Client as BlockClient>::Block>>: Sync,
FullBlockRangeRequest<Client>: Sync,
Option<Vec<SealedHeader<<Client as HeadersClient>::Header>>>: Sync,
VecDeque<SealedHeader<<Client as HeadersClient>::Header>>: Sync,
HashMap<SealedHeader<<Client as HeadersClient>::Header>, BodyResponse<<Client as BodiesClient>::Body>>: Sync,
impl<Client> Unpin for FetchFullBlockRangeFuture<Client>where
Arc<dyn Consensus<<Client as BlockClient>::Block>>: Unpin,
FullBlockRangeRequest<Client>: Unpin,
Option<Vec<SealedHeader<<Client as HeadersClient>::Header>>>: Unpin,
VecDeque<SealedHeader<<Client as HeadersClient>::Header>>: Unpin,
HashMap<SealedHeader<<Client as HeadersClient>::Header>, BodyResponse<<Client as BodiesClient>::Body>>: Unpin,
impl<Client> UnsafeUnpin for FetchFullBlockRangeFuture<Client>where
Client: UnsafeUnpin,
Arc<dyn Consensus<<Client as BlockClient>::Block>>: UnsafeUnpin,
FullBlockRangeRequest<Client>: UnsafeUnpin,
Option<Vec<SealedHeader<<Client as HeadersClient>::Header>>>: UnsafeUnpin,
VecDeque<SealedHeader<<Client as HeadersClient>::Header>>: UnsafeUnpin,
HashMap<SealedHeader<<Client as HeadersClient>::Header>, BodyResponse<<Client as BodiesClient>::Body>>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn map<U, F>(self, f: F) -> Map<Self, F> ⓘ
fn map<U, F>(self, f: F) -> Map<Self, F> ⓘ
§fn map_into<U>(self) -> MapInto<Self, U> ⓘ
fn map_into<U>(self) -> MapInto<Self, U> ⓘ
§fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F> ⓘ
fn then<Fut, F>(self, f: F) -> Then<Self, Fut, F> ⓘ
f. Read more§fn left_future<B>(self) -> Either<Self, B> ⓘ
fn left_future<B>(self) -> Either<Self, B> ⓘ
§fn right_future<A>(self) -> Either<A, Self> ⓘ
fn right_future<A>(self) -> Either<A, Self> ⓘ
§fn into_stream(self) -> IntoStream<Self>where
Self: Sized,
fn into_stream(self) -> IntoStream<Self>where
Self: Sized,
§fn flatten(self) -> Flatten<Self> ⓘ
fn flatten(self) -> Flatten<Self> ⓘ
§fn flatten_stream(self) -> FlattenStream<Self>
fn flatten_stream(self) -> FlattenStream<Self>
§fn fuse(self) -> Fuse<Self> ⓘwhere
Self: Sized,
fn fuse(self) -> Fuse<Self> ⓘwhere
Self: Sized,
poll will never again be called once it has
completed. This method can be used to turn any Future into a
FusedFuture. Read more§fn inspect<F>(self, f: F) -> Inspect<Self, F> ⓘ
fn inspect<F>(self, f: F) -> Inspect<Self, F> ⓘ
§fn catch_unwind(self) -> CatchUnwind<Self> ⓘwhere
Self: Sized + UnwindSafe,
fn catch_unwind(self) -> CatchUnwind<Self> ⓘwhere
Self: Sized + UnwindSafe,
std only.std, or crate features alloc and spin only.§fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)where
Self: Sized,
fn remote_handle(self) -> (Remote<Self>, RemoteHandle<Self::Output>)where
Self: Sized,
channel and std only.() on completion and sends
its output to another future on a separate task. Read more§fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
alloc only.§fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>where
Self: Sized + 'a,
fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>where
Self: Sized + 'a,
alloc only.§fn unit_error(self) -> UnitError<Self> ⓘwhere
Self: Sized,
fn unit_error(self) -> UnitError<Self> ⓘwhere
Self: Sized,
Future<Output = T> into a
TryFuture<Ok = T, Error = ()>.§fn never_error(self) -> NeverError<Self> ⓘwhere
Self: Sized,
fn never_error(self) -> NeverError<Self> ⓘwhere
Self: Sized,
Future<Output = T> into a
TryFuture<Ok = T, Error = Never>.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
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.