pub struct FullBlockClient<Client>where
Client: BlockClient,{ /* private fields */ }Expand description
A Client that can fetch full blocks from the network.
Implementations§
Source§impl<Client> FullBlockClient<Client>where
Client: BlockClient,
impl<Client> FullBlockClient<Client>where
Client: BlockClient,
Source§impl<Client> FullBlockClient<Client>where
Client: BlockClient,
impl<Client> FullBlockClient<Client>where
Client: BlockClient,
Sourcepub fn get_full_block(&self, hash: B256) -> FetchFullBlockFuture<Client> ⓘ
pub fn get_full_block(&self, hash: B256) -> FetchFullBlockFuture<Client> ⓘ
Returns a future that fetches the [SealedBlock] for the given hash.
Note: this future is cancel safe
Caution: This does no validation of body (transactions) response but guarantees that the
[SealedHeader] matches the requested hash.
Sourcepub fn get_full_block_range(
&self,
hash: B256,
count: u64,
) -> FetchFullBlockRangeFuture<Client> ⓘ
pub fn get_full_block_range( &self, hash: B256, count: u64, ) -> FetchFullBlockRangeFuture<Client> ⓘ
Returns a future that fetches [SealedBlock]s for the given hash and count.
Note: this future is cancel safe.
Caution: This does no validation of body (transactions) responses but guarantees that the headers form a valid range starting at the requested hash, and that the number of headers and bodies received matches the requested limit.
The returned future yields bodies in falling order, i.e. with descending block numbers.
Source§impl<Client> FullBlockClient<Client>where
Client: BlockClient + BlockAccessListsClient,
impl<Client> FullBlockClient<Client>where
Client: BlockClient + BlockAccessListsClient,
Sourcepub fn get_full_block_with_access_lists(
&self,
hash: B256,
) -> FetchFullBlockWithBalFuture<Client> ⓘ
pub fn get_full_block_with_access_lists( &self, hash: B256, ) -> FetchFullBlockWithBalFuture<Client> ⓘ
Returns a future that fetches the [SealedBlock] and optionally its block access list
for the given hash.
Note: this future is cancel safe
Caution: This does no validation of body (transactions) response but guarantees that the
[SealedHeader] matches the requested hash.
Sourcepub fn get_full_block_with_access_lists_with_requirement(
&self,
hash: B256,
requirement: BalRequirement,
) -> FetchFullBlockWithBalFuture<Client> ⓘ
pub fn get_full_block_with_access_lists_with_requirement( &self, hash: B256, requirement: BalRequirement, ) -> FetchFullBlockWithBalFuture<Client> ⓘ
Returns a future that fetches the [SealedBlock] and optionally its block access list
for the given hash using the requested BAL availability policy.
Note: this future is cancel safe
Caution: This does no validation of body (transactions) response but guarantees that the
[SealedHeader] matches the requested hash.
Sourcepub fn get_full_block_range_with_optional_access_lists(
&self,
hash: B256,
count: u64,
) -> FetchFullBlockRangeWithBalFuture<Client> ⓘ
pub fn get_full_block_range_with_optional_access_lists( &self, hash: B256, count: u64, ) -> FetchFullBlockRangeWithBalFuture<Client> ⓘ
Returns a future that fetches [SealedBlock]s and optionally their block access lists for
the given hash and count.
The block range is always the primary result. Access lists are requested after the block range is downloaded. Each block contains access-list data when the optional BAL response included the corresponding entry.
Sourcepub fn get_full_block_range_with_optional_access_lists_with_requirement(
&self,
hash: B256,
count: u64,
requirement: BalRequirement,
) -> FetchFullBlockRangeWithBalFuture<Client> ⓘ
pub fn get_full_block_range_with_optional_access_lists_with_requirement( &self, hash: B256, count: u64, requirement: BalRequirement, ) -> FetchFullBlockRangeWithBalFuture<Client> ⓘ
Returns a future that fetches [SealedBlock]s and optionally their block access lists for
the given hash and count using the requested BAL availability policy.
The block range is always the primary result. Access lists are requested after the block range is downloaded. Each block contains access-list data when the optional BAL response included the corresponding entry.
Trait Implementations§
Source§impl<Client> Clone for FullBlockClient<Client>
impl<Client> Clone for FullBlockClient<Client>
Auto Trait Implementations§
impl<Client> !RefUnwindSafe for FullBlockClient<Client>
impl<Client> !UnwindSafe for FullBlockClient<Client>
impl<Client> Freeze for FullBlockClient<Client>
impl<Client> Send for FullBlockClient<Client>
impl<Client> Sync for FullBlockClient<Client>
impl<Client> Unpin for FullBlockClient<Client>
impl<Client> UnsafeUnpin for FullBlockClient<Client>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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 moreimpl<T> MaybeDebug for Twhere
T: Debug,
§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.