Skip to main content

Encode

Trait Encode 

Source
pub trait Encode {
    // Required method
    fn encode(&self) -> Result<Vec<u8>>;
}
Expand description

Trait for encoding messages.

Required Methods§

Source

fn encode(&self) -> Result<Vec<u8>>

Encode a message to bytes.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§