Trait ArrayCodecTraits

Source
pub trait ArrayCodecTraits: CodecTraits {
    // Required method
    fn recommended_concurrency(
        &self,
        decoded_representation: &ChunkRepresentation,
    ) -> Result<RecommendedConcurrency, CodecError>;

    // Provided method
    fn partial_decode_granularity(
        &self,
        decoded_representation: &ChunkRepresentation,
    ) -> ChunkShape { ... }
}
Expand description

Traits for both array to array and array to bytes codecs.

Required Methods§

Source

fn recommended_concurrency( &self, decoded_representation: &ChunkRepresentation, ) -> Result<RecommendedConcurrency, CodecError>

Return the recommended concurrency for the requested decoded representation.

§Errors

Returns CodecError if the decoded representation is not valid for the codec.

Provided Methods§

Source

fn partial_decode_granularity( &self, decoded_representation: &ChunkRepresentation, ) -> ChunkShape

Return the partial decode granularity.

This represents the shape of the smallest subset of a chunk that can be efficiently decoded if the chunk were subdivided into a regular grid. For most codecs, this is just the shape of the chunk. It is the shape of the “inner chunks” for the sharding codec.

Implementors§