pub struct QueryChunk<'a> { /* private fields */ }Expand description
Query object used to query for chunk related details at a specific ChunkReference which
consists of either a chunk CryptoHash, or a BlockShardId (which consists of ShardId
and either block CryptoHash or BlockHeight).
The default behavior where a ChunkReference is not supplied will use a BlockShardId
referencing the latest block CryptoHash with ShardId of 0.
Implementations§
source§impl<'a> QueryChunk<'a>
impl<'a> QueryChunk<'a>
sourcepub fn block_hash_and_shard(self, hash: CryptoHash, shard_id: ShardId) -> Self
pub fn block_hash_and_shard(self, hash: CryptoHash, shard_id: ShardId) -> Self
Specify at which block hash and shard id to query the chunk from. Note that only archival networks will have the full history while networks like mainnet or testnet will only have the history from 5 or less epochs ago.
sourcepub fn block_height_and_shard(
self,
height: BlockHeight,
shard_id: ShardId,
) -> Self
pub fn block_height_and_shard( self, height: BlockHeight, shard_id: ShardId, ) -> Self
Specify at which block height and shard id to query the chunk from. Note that only archival networks will have the full history while networks like mainnet or testnet will only have the history from 5 or less epochs ago.
sourcepub fn chunk_hash(self, hash: CryptoHash) -> Self
pub fn chunk_hash(self, hash: CryptoHash) -> Self
Specify at which chunk hash to query the chunk from.
Trait Implementations§
source§impl<'a> IntoFuture for QueryChunk<'a>
impl<'a> IntoFuture for QueryChunk<'a>
source§type IntoFuture = Pin<Box<dyn Future<Output = <QueryChunk<'a> as IntoFuture>::Output> + Send + 'a>>
type IntoFuture = Pin<Box<dyn Future<Output = <QueryChunk<'a> as IntoFuture>::Output> + Send + 'a>>
source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Auto Trait Implementations§
impl<'a> Freeze for QueryChunk<'a>
impl<'a> !RefUnwindSafe for QueryChunk<'a>
impl<'a> Send for QueryChunk<'a>
impl<'a> Sync for QueryChunk<'a>
impl<'a> Unpin for QueryChunk<'a>
impl<'a> !UnwindSafe for QueryChunk<'a>
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
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>
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 more