pub trait Codec:
'static
+ Send
+ Sync
+ Clone {
type Error: 'static + Send + Sync + Error;
// Required methods
fn encode(&self, data: AnyCowArray<'_>) -> Result<AnyArray, Self::Error>;
fn decode(&self, encoded: AnyCowArray<'_>) -> Result<AnyArray, Self::Error>;
fn decode_into(
&self,
encoded: AnyArrayView<'_>,
decoded: AnyArrayViewMut<'_>,
) -> Result<(), Self::Error>;
}
Required Associated Types§
Required Methods§
sourcefn decode_into(
&self,
encoded: AnyArrayView<'_>,
decoded: AnyArrayViewMut<'_>,
) -> Result<(), Self::Error>
fn decode_into( &self, encoded: AnyArrayView<'_>, decoded: AnyArrayViewMut<'_>, ) -> Result<(), Self::Error>
Decodes the encoded
data and writes the result into the provided
decoded
output.
The output must have the correct type and shape.
§Errors
Errors if decoding the buffer fails.
Object Safety§
This trait is not object safe.