Struct near_fetch::query::QueryChunk
source · 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>
§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> !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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request