pub trait Encode: Clone {
const SIZE: DataSize;
// Required methods
fn encode(&self) -> Cow<'_, [u8]>;
fn decode(data: Cow<'_, [u8]>) -> MemoryResult<Self>
where Self: Sized;
fn size(&self) -> MSize;
}Expand description
This trait defines the encoding and decoding behaviour for data types used in the DBMS canister.
Required Associated Constants§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.