pub trait KeySerde: Sized {
// Required methods
fn encode(&self) -> Result<Vec<u8>, KeySerializeError>;
fn decode(bytes: &mut &[u8]) -> Result<Self, KeyDeserializeError>;
}Required Methods§
fn encode(&self) -> Result<Vec<u8>, KeySerializeError>
fn decode(bytes: &mut &[u8]) -> Result<Self, KeyDeserializeError>
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.