Trait Encoder

Source
pub trait Encoder {
    // Required method
    fn encode<T: Serialize + ?Sized>(t: &T) -> Result<Vec<u8>, Box<dyn Error>>;
}

Required Methods§

Source

fn encode<T: Serialize + ?Sized>(t: &T) -> Result<Vec<u8>, Box<dyn Error>>

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§