pub struct BitroundCodec { /* private fields */ }
Available on crate feature
bitround
only.Expand description
A bitround
codec implementation.
Implementations§
Source§impl BitroundCodec
impl BitroundCodec
Sourcepub const fn new(keepbits: u32) -> Self
pub const fn new(keepbits: u32) -> Self
Create a new bitround
codec.
keepbits
is the number of bits to round to in the floating point mantissa.
Sourcepub fn new_with_configuration(
configuration: &BitroundCodecConfiguration,
) -> Result<Self, PluginCreateError>
pub fn new_with_configuration( configuration: &BitroundCodecConfiguration, ) -> Result<Self, PluginCreateError>
Create a new bitround
codec from a configuration.
§Errors
Returns an error if the configuration is not supported.
Trait Implementations§
Source§impl ArrayCodecTraits for BitroundCodec
impl ArrayCodecTraits for BitroundCodec
Source§fn recommended_concurrency(
&self,
_decoded_representation: &ChunkRepresentation,
) -> Result<RecommendedConcurrency, CodecError>
fn recommended_concurrency( &self, _decoded_representation: &ChunkRepresentation, ) -> Result<RecommendedConcurrency, CodecError>
Return the recommended concurrency for the requested decoded representation. Read more
Source§fn partial_decode_granularity(
&self,
decoded_representation: &ChunkRepresentation,
) -> ChunkShape
fn partial_decode_granularity( &self, decoded_representation: &ChunkRepresentation, ) -> ChunkShape
Return the partial decode granularity. Read more
Source§impl ArrayToArrayCodecTraits for BitroundCodec
impl ArrayToArrayCodecTraits for BitroundCodec
Source§fn into_dyn(self: Arc<Self>) -> Arc<dyn ArrayToArrayCodecTraits>
fn into_dyn(self: Arc<Self>) -> Arc<dyn ArrayToArrayCodecTraits>
Return a dynamic version of the codec.
Source§fn encode<'a>(
&self,
bytes: ArrayBytes<'a>,
decoded_representation: &ChunkRepresentation,
_options: &CodecOptions,
) -> Result<ArrayBytes<'a>, CodecError>
fn encode<'a>( &self, bytes: ArrayBytes<'a>, decoded_representation: &ChunkRepresentation, _options: &CodecOptions, ) -> Result<ArrayBytes<'a>, CodecError>
Encode a chunk. Read more
Source§fn decode<'a>(
&self,
bytes: ArrayBytes<'a>,
_decoded_representation: &ChunkRepresentation,
_options: &CodecOptions,
) -> Result<ArrayBytes<'a>, CodecError>
fn decode<'a>( &self, bytes: ArrayBytes<'a>, _decoded_representation: &ChunkRepresentation, _options: &CodecOptions, ) -> Result<ArrayBytes<'a>, CodecError>
Decode a chunk. Read more
Source§fn partial_decoder(
self: Arc<Self>,
input_handle: Arc<dyn ArrayPartialDecoderTraits>,
decoded_representation: &ChunkRepresentation,
_options: &CodecOptions,
) -> Result<Arc<dyn ArrayPartialDecoderTraits>, CodecError>
fn partial_decoder( self: Arc<Self>, input_handle: Arc<dyn ArrayPartialDecoderTraits>, decoded_representation: &ChunkRepresentation, _options: &CodecOptions, ) -> Result<Arc<dyn ArrayPartialDecoderTraits>, CodecError>
Initialise a partial decoder. Read more
Source§fn partial_encoder(
self: Arc<Self>,
input_output_handle: Arc<dyn ArrayPartialEncoderTraits>,
decoded_representation: &ChunkRepresentation,
_options: &CodecOptions,
) -> Result<Arc<dyn ArrayPartialEncoderTraits>, CodecError>
fn partial_encoder( self: Arc<Self>, input_output_handle: Arc<dyn ArrayPartialEncoderTraits>, decoded_representation: &ChunkRepresentation, _options: &CodecOptions, ) -> Result<Arc<dyn ArrayPartialEncoderTraits>, CodecError>
Initialise a partial encoder. Read more
Source§fn async_partial_decoder<'life0, 'life1, 'async_trait>(
self: Arc<Self>,
input_handle: Arc<dyn AsyncArrayPartialDecoderTraits>,
decoded_representation: &'life0 ChunkRepresentation,
_options: &'life1 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn AsyncArrayPartialDecoderTraits>, CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn async_partial_decoder<'life0, 'life1, 'async_trait>(
self: Arc<Self>,
input_handle: Arc<dyn AsyncArrayPartialDecoderTraits>,
decoded_representation: &'life0 ChunkRepresentation,
_options: &'life1 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn AsyncArrayPartialDecoderTraits>, CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Available on crate feature
async
only.Initialise an asynchronous partial decoder. Read more
Source§fn async_partial_encoder<'life0, 'life1, 'async_trait>(
self: Arc<Self>,
input_output_handle: Arc<dyn AsyncArrayPartialEncoderTraits>,
decoded_representation: &'life0 ChunkRepresentation,
_options: &'life1 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn AsyncArrayPartialEncoderTraits>, CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn async_partial_encoder<'life0, 'life1, 'async_trait>(
self: Arc<Self>,
input_output_handle: Arc<dyn AsyncArrayPartialEncoderTraits>,
decoded_representation: &'life0 ChunkRepresentation,
_options: &'life1 CodecOptions,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn AsyncArrayPartialEncoderTraits>, CodecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Available on crate feature
async
only.Initialise an asynchronous partial encoder. Read more
Source§fn encoded_data_type(
&self,
decoded_data_type: &DataType,
) -> Result<DataType, CodecError>
fn encoded_data_type( &self, decoded_data_type: &DataType, ) -> Result<DataType, CodecError>
Returns the encoded data type for a given decoded data type. Read more
Source§fn encoded_fill_value(
&self,
decoded_data_type: &DataType,
decoded_fill_value: &FillValue,
) -> Result<FillValue, CodecError>
fn encoded_fill_value( &self, decoded_data_type: &DataType, decoded_fill_value: &FillValue, ) -> Result<FillValue, CodecError>
Returns the encoded fill value for a given decoded fill value Read more
Source§fn encoded_shape(
&self,
decoded_shape: &[NonZeroU64],
) -> Result<ChunkShape, CodecError>
fn encoded_shape( &self, decoded_shape: &[NonZeroU64], ) -> Result<ChunkShape, CodecError>
Returns the shape of the encoded chunk for a given decoded chunk shape. Read more
Source§fn decoded_shape(
&self,
encoded_shape: &[NonZeroU64],
) -> Result<Option<ChunkShape>, CodecError>
fn decoded_shape( &self, encoded_shape: &[NonZeroU64], ) -> Result<Option<ChunkShape>, CodecError>
Returns the shape of the decoded chunk for a given encoded chunk shape. Read more
Source§fn encoded_representation(
&self,
decoded_representation: &ChunkRepresentation,
) -> Result<ChunkRepresentation, CodecError>
fn encoded_representation( &self, decoded_representation: &ChunkRepresentation, ) -> Result<ChunkRepresentation, CodecError>
Returns the encoded chunk representation given the decoded chunk representation. Read more
Source§impl Clone for BitroundCodec
impl Clone for BitroundCodec
Source§fn clone(&self) -> BitroundCodec
fn clone(&self) -> BitroundCodec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl CodecTraits for BitroundCodec
impl CodecTraits for BitroundCodec
Source§fn identifier(&self) -> &str
fn identifier(&self) -> &str
Unique identifier for the codec.
Source§fn configuration_opt(
&self,
_name: &str,
options: &CodecMetadataOptions,
) -> Option<Configuration>
fn configuration_opt( &self, _name: &str, options: &CodecMetadataOptions, ) -> Option<Configuration>
Create the codec configuration. Read more
Source§fn partial_decoder_capability(&self) -> PartialDecoderCapability
fn partial_decoder_capability(&self) -> PartialDecoderCapability
Returns the partial decoder capability of this codec.
Source§fn partial_encoder_capability(&self) -> PartialEncoderCapability
fn partial_encoder_capability(&self) -> PartialEncoderCapability
Returns the partial encoder capability of this codec.
Source§fn default_name(&self) -> String
fn default_name(&self) -> String
The default name of the codec.
Source§fn configuration(&self, name: &str) -> Option<Configuration>
fn configuration(&self, name: &str) -> Option<Configuration>
Create the codec configuration with default options. Read more
Source§impl Debug for BitroundCodec
impl Debug for BitroundCodec
Source§impl Default for BitroundCodec
impl Default for BitroundCodec
Source§fn default() -> BitroundCodec
fn default() -> BitroundCodec
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BitroundCodec
impl Send for BitroundCodec
impl Sync for BitroundCodec
impl RefUnwindSafe for BitroundCodec
impl Unpin for BitroundCodec
impl UnwindSafe for BitroundCodec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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