Struct zarrs::array::codec::ArrayPartialDecoderCache
source · pub struct ArrayPartialDecoderCache<'a> { /* private fields */ }
Expand description
A cache for an ArrayPartialDecoderTraits
partial decoder.
Implementations§
source§impl<'a> ArrayPartialDecoderCache<'a>
impl<'a> ArrayPartialDecoderCache<'a>
sourcepub fn new(
input_handle: &dyn ArrayPartialDecoderTraits,
decoded_representation: ChunkRepresentation,
options: &CodecOptions
) -> Result<Self, CodecError>
pub fn new( input_handle: &dyn ArrayPartialDecoderTraits, decoded_representation: ChunkRepresentation, options: &CodecOptions ) -> Result<Self, CodecError>
Create a new partial decoder cache.
§Errors
Returns a CodecError
if initialisation of the partial decoder fails.
sourcepub async fn async_new(
input_handle: &dyn AsyncArrayPartialDecoderTraits,
decoded_representation: ChunkRepresentation,
options: &CodecOptions
) -> Result<ArrayPartialDecoderCache<'a>, CodecError>
Available on crate feature async
only.
pub async fn async_new( input_handle: &dyn AsyncArrayPartialDecoderTraits, decoded_representation: ChunkRepresentation, options: &CodecOptions ) -> Result<ArrayPartialDecoderCache<'a>, CodecError>
async
only.Create a new asynchronous partial decoder cache.
§Errors
Returns a CodecError
if initialisation of the partial decoder fails.
Trait Implementations§
source§impl<'a> ArrayPartialDecoderTraits for ArrayPartialDecoderCache<'a>
impl<'a> ArrayPartialDecoderTraits for ArrayPartialDecoderCache<'a>
source§fn element_size(&self) -> usize
fn element_size(&self) -> usize
Return the element size of the partial decoder.
source§fn partial_decode_opt(
&self,
decoded_regions: &[ArraySubset],
_options: &CodecOptions
) -> Result<Vec<Vec<u8>>, CodecError>
fn partial_decode_opt( &self, decoded_regions: &[ArraySubset], _options: &CodecOptions ) -> Result<Vec<Vec<u8>>, CodecError>
Explicit options version of
partial_decode
.source§fn partial_decode(
&self,
array_subsets: &[ArraySubset]
) -> Result<Vec<Vec<u8>>, CodecError>
fn partial_decode( &self, array_subsets: &[ArraySubset] ) -> Result<Vec<Vec<u8>>, CodecError>
Partially decode a chunk with default codec options. Read more
source§fn partial_decode_into_array_view(
&self,
array_subset: &ArraySubset,
array_view: &ArrayView<'_>
) -> Result<(), CodecError>
fn partial_decode_into_array_view( &self, array_subset: &ArraySubset, array_view: &ArrayView<'_> ) -> Result<(), CodecError>
Partially decode a subset of an array into an array view with default codec options. Read more
source§fn partial_decode_into_array_view_opt(
&self,
array_subset: &ArraySubset,
array_view: &ArrayView<'_>,
options: &CodecOptions
) -> Result<(), CodecError>
fn partial_decode_into_array_view_opt( &self, array_subset: &ArraySubset, array_view: &ArrayView<'_>, options: &CodecOptions ) -> Result<(), CodecError>
Explicit options version of
partial_decode_into_array_view
.source§impl<'a> AsyncArrayPartialDecoderTraits for ArrayPartialDecoderCache<'a>
Available on crate feature async
only.
impl<'a> AsyncArrayPartialDecoderTraits for ArrayPartialDecoderCache<'a>
Available on crate feature
async
only.source§fn element_size(&self) -> usize
fn element_size(&self) -> usize
Return the element size of the partial decoder.
source§fn partial_decode_opt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
decoded_regions: &'life1 [ArraySubset],
options: &'life2 CodecOptions
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<u8>>, CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn partial_decode_opt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
decoded_regions: &'life1 [ArraySubset],
options: &'life2 CodecOptions
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<u8>>, CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Explicit options variant of
partial_decode
.source§fn partial_decode<'life0, 'life1, 'async_trait>(
&'life0 self,
array_subsets: &'life1 [ArraySubset]
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<u8>>, CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn partial_decode<'life0, 'life1, 'async_trait>(
&'life0 self,
array_subsets: &'life1 [ArraySubset]
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<u8>>, CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Partially decode a chunk with default codec options. Read more
source§fn partial_decode_into_array_view<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
array_subset: &'life1 ArraySubset,
array_view: &'life2 ArrayView<'_>
) -> Pin<Box<dyn Future<Output = Result<(), CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn partial_decode_into_array_view<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
array_subset: &'life1 ArraySubset,
array_view: &'life2 ArrayView<'_>
) -> Pin<Box<dyn Future<Output = Result<(), CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Partially decode a subset of an array into an array view with default codec options. Read more
source§fn partial_decode_into_array_view_opt<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
array_subset: &'life1 ArraySubset,
array_view: &'life2 ArrayView<'_>,
options: &'life3 CodecOptions
) -> Pin<Box<dyn Future<Output = Result<(), CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn partial_decode_into_array_view_opt<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
array_subset: &'life1 ArraySubset,
array_view: &'life2 ArrayView<'_>,
options: &'life3 CodecOptions
) -> Pin<Box<dyn Future<Output = Result<(), CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Explicit options variant of
partial_decode_into_array_view
.Auto Trait Implementations§
impl<'a> Freeze for ArrayPartialDecoderCache<'a>
impl<'a> RefUnwindSafe for ArrayPartialDecoderCache<'a>
impl<'a> Send for ArrayPartialDecoderCache<'a>
impl<'a> Sync for ArrayPartialDecoderCache<'a>
impl<'a> Unpin for ArrayPartialDecoderCache<'a>
impl<'a> UnwindSafe for ArrayPartialDecoderCache<'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
Mutably borrows from an owned value. Read more