Backend

Trait Backend 

Source
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§

Source

fn to_bytes<P>(data: &P) -> Result<Vec<u8>, ()>
where P: Serialize,

Source

fn from_bytes<P>(bytes: &[u8]) -> Result<P, ()>

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.

Implementors§