Trait Encode

Source
pub trait Encode: Sized {
    // Required method
    fn encode<W: Write>(&self, w: W) -> Result<usize, Error>;
}

Required Methods§

Source

fn encode<W: Write>(&self, w: W) -> Result<usize, 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.

Implementations on Foreign Types§

Source§

impl Encode for bool

Source§

fn encode<W: Write>(&self, w: W) -> Result<usize, Error>

Source§

impl Encode for u8

Source§

fn encode<W: Write>(&self, w: W) -> Result<usize, Error>

Source§

impl Encode for u32

Source§

fn encode<W: Write>(&self, w: W) -> Result<usize, Error>

Source§

impl Encode for u64

Source§

fn encode<W: Write>(&self, w: W) -> Result<usize, Error>

Source§

impl Encode for ()

Source§

fn encode<W: Write>(&self, _w: W) -> Result<usize, Error>

Source§

impl Encode for String

Source§

fn encode<W: Write>(&self, w: W) -> Result<usize, Error>

Source§

impl Encode for Vec<u8>

Source§

fn encode<W: Write>(&self, w: W) -> Result<usize, Error>

Source§

impl<A: Encode, B: Encode> Encode for (A, B)

Source§

fn encode<W: Write>(&self, w: W) -> Result<usize, Error>

Source§

impl<T: Encode> Encode for Option<T>

Source§

fn encode<W: Write>(&self, w: W) -> Result<usize, Error>

Source§

impl<T: Encode> Encode for &T

Source§

fn encode<W: Write>(&self, w: W) -> Result<usize, Error>

Implementors§

Source§

impl Encode for Segment

Source§

impl<T> Encode for WithChecksum<T>
where T: Encode,