moq_transfork::coding

Trait Encode

Source
pub trait Encode: Sized {
    // Required method
    fn encode<W: BufMut>(&self, w: &mut W);

    // Provided method
    fn encode_size(&self) -> usize { ... }
}

Required Methods§

Source

fn encode<W: BufMut>(&self, w: &mut W)

Provided Methods§

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 &str

Source§

fn encode<W: BufMut>(&self, w: &mut W)

Source§

impl Encode for i8

Source§

fn encode<W: BufMut>(&self, w: &mut W)

Source§

impl Encode for u8

Source§

fn encode<W: BufMut>(&self, w: &mut W)

Source§

impl Encode for u32

Source§

fn encode<W: BufMut>(&self, w: &mut W)

Source§

impl Encode for u64

Source§

fn encode<W: BufMut>(&self, w: &mut W)

Encode a varint to the given writer.

Source§

impl Encode for usize

Source§

fn encode<W: BufMut>(&self, w: &mut W)

Encode a varint to the given writer.

Source§

impl Encode for String

Source§

fn encode<W: BufMut>(&self, w: &mut W)

Source§

impl Encode for Duration

Source§

fn encode<W: BufMut>(&self, w: &mut W)

Source§

impl<T: Encode> Encode for &[T]

Source§

fn encode<W: BufMut>(&self, w: &mut W)

Source§

impl<T: Encode> Encode for Arc<T>

Source§

fn encode<W: BufMut>(&self, w: &mut W)

Source§

impl<T: Encode> Encode for Vec<T>

Source§

fn encode<W: BufMut>(&self, w: &mut W)

Implementors§