pub trait AsyncArrayShardedReadableExt<TStorage: ?Sized + AsyncReadableStorageTraits + 'static>: Sealed {
// Required methods
fn async_subchunk_byte_range<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunk_indices: &'life2 [u64],
) -> Pin<Box<dyn Future<Output = Result<Option<ByteRange>, ArrayError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn async_retrieve_encoded_subchunk<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunk_indices: &'life2 [u64],
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, ArrayError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn async_retrieve_subchunk_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunk_indices: &'life2 [u64],
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<T, ArrayError>> + Send + 'async_trait>>
where T: 'async_trait + FromArrayBytes + MaybeSend,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn async_retrieve_subchunk_elements_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunk_indices: &'life2 [u64],
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, ArrayError>> + Send + 'async_trait>>
where T: 'async_trait + ElementOwned + MaybeSend + MaybeSync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn async_retrieve_subchunk_ndarray_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunk_indices: &'life2 [u64],
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<ArrayD<T>, ArrayError>> + Send + 'async_trait>>
where T: 'async_trait + ElementOwned + MaybeSend + MaybeSync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn async_retrieve_subchunks_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunks: &'life2 dyn ArraySubsetTraits,
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<T, ArrayError>> + Send + 'async_trait>>
where T: 'async_trait + FromArrayBytes + MaybeSend,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn async_retrieve_subchunks_elements_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunks: &'life2 dyn ArraySubsetTraits,
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, ArrayError>> + Send + 'async_trait>>
where T: 'async_trait + ElementOwned + MaybeSend + MaybeSync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn async_retrieve_subchunks_ndarray_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunks: &'life2 dyn ArraySubsetTraits,
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<ArrayD<T>, ArrayError>> + Send + 'async_trait>>
where T: 'async_trait + ElementOwned + MaybeSend + MaybeSync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn async_retrieve_array_subset_sharded_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
array_subset: &'life2 dyn ArraySubsetTraits,
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<T, ArrayError>> + Send + 'async_trait>>
where T: 'async_trait + FromArrayBytes + MaybeSend,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn async_retrieve_array_subset_elements_sharded_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
array_subset: &'life2 dyn ArraySubsetTraits,
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, ArrayError>> + Send + 'async_trait>>
where T: 'async_trait + ElementOwned + MaybeSend + MaybeSync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn async_retrieve_array_subset_ndarray_sharded_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
array_subset: &'life2 dyn ArraySubsetTraits,
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<ArrayD<T>, ArrayError>> + Send + 'async_trait>>
where T: 'async_trait + ElementOwned + MaybeSend + MaybeSync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}sharding and async only.Expand description
An Array extension trait to efficiently read data (e.g. subchunks) from arrays using the sharding_indexed codec.
s
Sharding indexes are cached in a AsyncArrayShardedReadableExtCache enabling faster retrieval.
Required Methodsยง
Sourcefn async_subchunk_byte_range<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunk_indices: &'life2 [u64],
) -> Pin<Box<dyn Future<Output = Result<Option<ByteRange>, ArrayError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn async_subchunk_byte_range<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunk_indices: &'life2 [u64],
) -> Pin<Box<dyn Future<Output = Result<Option<ByteRange>, ArrayError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Retrieve the byte range of an encoded subchunk.
ยงErrors
Returns an ArrayError on failure, such as if decoding the shard index fails.
Sourcefn async_retrieve_encoded_subchunk<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunk_indices: &'life2 [u64],
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, ArrayError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn async_retrieve_encoded_subchunk<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunk_indices: &'life2 [u64],
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, ArrayError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Retrieve the encoded bytes of a subchunk.
Sourcefn async_retrieve_subchunk_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunk_indices: &'life2 [u64],
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<T, ArrayError>> + Send + 'async_trait>>where
T: 'async_trait + FromArrayBytes + MaybeSend,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn async_retrieve_subchunk_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunk_indices: &'life2 [u64],
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<T, ArrayError>> + Send + 'async_trait>>where
T: 'async_trait + FromArrayBytes + MaybeSend,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Read and decode the subchunk at subchunk_indices into its bytes.
Sourcefn async_retrieve_subchunk_elements_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunk_indices: &'life2 [u64],
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, ArrayError>> + Send + 'async_trait>>where
T: 'async_trait + ElementOwned + MaybeSend + MaybeSync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
๐Deprecated since 0.23.0: Use async_retrieve_subchunk_opt::<Vec<T>>() instead
fn async_retrieve_subchunk_elements_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunk_indices: &'life2 [u64],
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, ArrayError>> + Send + 'async_trait>>where
T: 'async_trait + ElementOwned + MaybeSend + MaybeSync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Use async_retrieve_subchunk_opt::<Vec<T>>() instead
Read and decode the subchunk at subchunk_indices into a vector of its elements.
Sourcefn async_retrieve_subchunk_ndarray_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunk_indices: &'life2 [u64],
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<ArrayD<T>, ArrayError>> + Send + 'async_trait>>where
T: 'async_trait + ElementOwned + MaybeSend + MaybeSync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
๐Deprecated since 0.23.0: Use async_retrieve_subchunk_opt::<ndarray::ArrayD<T>>() instead
Available on crate feature ndarray only.
fn async_retrieve_subchunk_ndarray_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunk_indices: &'life2 [u64],
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<ArrayD<T>, ArrayError>> + Send + 'async_trait>>where
T: 'async_trait + ElementOwned + MaybeSend + MaybeSync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Use async_retrieve_subchunk_opt::<ndarray::ArrayD<T>>() instead
ndarray only.Read and decode the subchunk at subchunk_indices into an ndarray::ArrayD.
Sourcefn async_retrieve_subchunks_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunks: &'life2 dyn ArraySubsetTraits,
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<T, ArrayError>> + Send + 'async_trait>>where
T: 'async_trait + FromArrayBytes + MaybeSend,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn async_retrieve_subchunks_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunks: &'life2 dyn ArraySubsetTraits,
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<T, ArrayError>> + Send + 'async_trait>>where
T: 'async_trait + FromArrayBytes + MaybeSend,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Read and decode the chunks at chunks.
Sourcefn async_retrieve_subchunks_elements_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunks: &'life2 dyn ArraySubsetTraits,
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, ArrayError>> + Send + 'async_trait>>where
T: 'async_trait + ElementOwned + MaybeSend + MaybeSync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
๐Deprecated since 0.23.0: Use async_retrieve_subchunks_opt::<Vec<T>>() instead
fn async_retrieve_subchunks_elements_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunks: &'life2 dyn ArraySubsetTraits,
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, ArrayError>> + Send + 'async_trait>>where
T: 'async_trait + ElementOwned + MaybeSend + MaybeSync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Use async_retrieve_subchunks_opt::<Vec<T>>() instead
Read and decode the subchunks at subchunks into a vector of their elements.
Sourcefn async_retrieve_subchunks_ndarray_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunks: &'life2 dyn ArraySubsetTraits,
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<ArrayD<T>, ArrayError>> + Send + 'async_trait>>where
T: 'async_trait + ElementOwned + MaybeSend + MaybeSync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
๐Deprecated since 0.23.0: Use async_retrieve_subchunks_opt::<ndarray::ArrayD<T>>() instead
Available on crate feature ndarray only.
fn async_retrieve_subchunks_ndarray_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
subchunks: &'life2 dyn ArraySubsetTraits,
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<ArrayD<T>, ArrayError>> + Send + 'async_trait>>where
T: 'async_trait + ElementOwned + MaybeSend + MaybeSync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Use async_retrieve_subchunks_opt::<ndarray::ArrayD<T>>() instead
ndarray only.Read and decode the subchunks at subchunks into an ndarray::ArrayD.
Sourcefn async_retrieve_array_subset_sharded_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
array_subset: &'life2 dyn ArraySubsetTraits,
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<T, ArrayError>> + Send + 'async_trait>>where
T: 'async_trait + FromArrayBytes + MaybeSend,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn async_retrieve_array_subset_sharded_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
array_subset: &'life2 dyn ArraySubsetTraits,
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<T, ArrayError>> + Send + 'async_trait>>where
T: 'async_trait + FromArrayBytes + MaybeSend,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Read and decode the array_subset of array.
Sourcefn async_retrieve_array_subset_elements_sharded_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
array_subset: &'life2 dyn ArraySubsetTraits,
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, ArrayError>> + Send + 'async_trait>>where
T: 'async_trait + ElementOwned + MaybeSend + MaybeSync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
๐Deprecated since 0.23.0: Use async_retrieve_array_subset_sharded_opt::<Vec<T>>() instead
fn async_retrieve_array_subset_elements_sharded_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
array_subset: &'life2 dyn ArraySubsetTraits,
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<T>, ArrayError>> + Send + 'async_trait>>where
T: 'async_trait + ElementOwned + MaybeSend + MaybeSync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Use async_retrieve_array_subset_sharded_opt::<Vec<T>>() instead
Read and decode the array_subset of array into a vector of its elements.
Sourcefn async_retrieve_array_subset_ndarray_sharded_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
array_subset: &'life2 dyn ArraySubsetTraits,
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<ArrayD<T>, ArrayError>> + Send + 'async_trait>>where
T: 'async_trait + ElementOwned + MaybeSend + MaybeSync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
๐Deprecated since 0.23.0: Use async_retrieve_array_subset_sharded_opt::<ndarray::ArrayD<T>>() instead
Available on crate feature ndarray only.
fn async_retrieve_array_subset_ndarray_sharded_opt<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
cache: &'life1 AsyncArrayShardedReadableExtCache,
array_subset: &'life2 dyn ArraySubsetTraits,
options: &'life3 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<ArrayD<T>, ArrayError>> + Send + 'async_trait>>where
T: 'async_trait + ElementOwned + MaybeSend + MaybeSync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Use async_retrieve_array_subset_sharded_opt::<ndarray::ArrayD<T>>() instead
ndarray only.Read and decode the array_subset of array into an ndarray::ArrayD.
Dyn Compatibilityยง
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.