pub trait Backend {
// Required methods
fn to_bytes<P>(data: &P) -> Result<Vec<u8>, ()>
where P: Serialize;
fn from_bytes<P>(bytes: &[u8]) -> Result<P, ()>
where P: DeserializeOwned;
}Required Methods§
fn to_bytes<P>(data: &P) -> Result<Vec<u8>, ()>where
P: Serialize,
fn from_bytes<P>(bytes: &[u8]) -> Result<P, ()>where
P: DeserializeOwned,
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.