pub trait Serialise<C>: Sized {
type Error;
// Required methods
fn encode(&self) -> Result<Vec64<u8>, Self::Error>;
fn decode(bytes: &[u8]) -> Result<Self, Self::Error>;
// Provided method
fn decode_owned(bytes: Vec64<u8>) -> Result<Self, Self::Error> { ... }
}Expand description
Encodes and decodes a value using codec C.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn decode_owned(bytes: Vec64<u8>) -> Result<Self, Self::Error>
fn decode_owned(bytes: Vec64<u8>) -> Result<Self, Self::Error>
Decodes a value from an owned byte buffer.
The default implementation delegates to Self::decode. Codecs may
override this method when they can consume the buffer without copying.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl Serialise<ArrowIpcCodec<Vec64<u8>>> for BooleanArray<()>
impl Serialise<ArrowIpcCodec<Vec64<u8>>> for BooleanArray<()>
Source§impl Serialise<ArrowIpcCodec<Vec64<u8>>> for CategoricalArray<u8>
Available on crate feature default_categorical_8 only.
impl Serialise<ArrowIpcCodec<Vec64<u8>>> for CategoricalArray<u8>
Available on crate feature
default_categorical_8 only.