Skip to main content

WireEncode

Trait WireEncode 

Source
pub trait WireEncode {
    // Required methods
    fn wire_encode(&self, buf: &mut Vec<u8>);
    fn wire_size(&self) -> usize;
}
Expand description

Encode a value into a byte buffer in conduit’s binary wire format.

Required Methods§

Source

fn wire_encode(&self, buf: &mut Vec<u8>)

Append the encoded representation to buf.

Source

fn wire_size(&self) -> usize

The exact number of bytes that wire_encode will append.

Implementations on Foreign Types§

Source§

impl WireEncode for bool

Source§

fn wire_encode(&self, buf: &mut Vec<u8>)

Source§

fn wire_size(&self) -> usize

Source§

impl WireEncode for f32

Source§

fn wire_encode(&self, buf: &mut Vec<u8>)

Source§

fn wire_size(&self) -> usize

Source§

impl WireEncode for f64

Source§

fn wire_encode(&self, buf: &mut Vec<u8>)

Source§

fn wire_size(&self) -> usize

Source§

impl WireEncode for i8

Source§

fn wire_encode(&self, buf: &mut Vec<u8>)

Source§

fn wire_size(&self) -> usize

Source§

impl WireEncode for i16

Source§

fn wire_encode(&self, buf: &mut Vec<u8>)

Source§

fn wire_size(&self) -> usize

Source§

impl WireEncode for i32

Source§

fn wire_encode(&self, buf: &mut Vec<u8>)

Source§

fn wire_size(&self) -> usize

Source§

impl WireEncode for i64

Source§

fn wire_encode(&self, buf: &mut Vec<u8>)

Source§

fn wire_size(&self) -> usize

Source§

impl WireEncode for u8

Source§

fn wire_encode(&self, buf: &mut Vec<u8>)

Source§

fn wire_size(&self) -> usize

Source§

impl WireEncode for u16

Source§

fn wire_encode(&self, buf: &mut Vec<u8>)

Source§

fn wire_size(&self) -> usize

Source§

impl WireEncode for u32

Source§

fn wire_encode(&self, buf: &mut Vec<u8>)

Source§

fn wire_size(&self) -> usize

Source§

impl WireEncode for u64

Source§

fn wire_encode(&self, buf: &mut Vec<u8>)

Source§

fn wire_size(&self) -> usize

Source§

impl WireEncode for String

Source§

fn wire_encode(&self, buf: &mut Vec<u8>)

Source§

fn wire_size(&self) -> usize

Source§

impl WireEncode for Vec<u8>

Source§

fn wire_encode(&self, buf: &mut Vec<u8>)

Source§

fn wire_size(&self) -> usize

Implementors§