FastSerialize

Trait FastSerialize 

Source
pub trait FastSerialize {
    // Required method
    fn write_to_buffer(&self, buffer: &mut Vec<u8>);

    // Provided method
    fn size_hint(&self) -> usize { ... }
}
Expand description

Trait for types that can be efficiently serialized for logging

Required Methods§

Source

fn write_to_buffer(&self, buffer: &mut Vec<u8>)

Write the value to the buffer in binary format

Provided Methods§

Source

fn size_hint(&self) -> usize

Hint about the serialized size (for buffer pre-allocation)

Implementations on Foreign Types§

Source§

impl FastSerialize for &&str

Source§

fn write_to_buffer(&self, buffer: &mut Vec<u8>)

Source§

fn size_hint(&self) -> usize

Source§

impl FastSerialize for &str

Source§

fn write_to_buffer(&self, buffer: &mut Vec<u8>)

Source§

fn size_hint(&self) -> usize

Source§

impl FastSerialize for &String

Source§

fn write_to_buffer(&self, buffer: &mut Vec<u8>)

Source§

fn size_hint(&self) -> usize

Source§

impl FastSerialize for &[u8]

Source§

fn write_to_buffer(&self, buffer: &mut Vec<u8>)

Source§

fn size_hint(&self) -> usize

Source§

impl FastSerialize for bool

Source§

fn write_to_buffer(&self, buffer: &mut Vec<u8>)

Source§

fn size_hint(&self) -> usize

Source§

impl FastSerialize for f32

Source§

fn write_to_buffer(&self, buffer: &mut Vec<u8>)

Source§

fn size_hint(&self) -> usize

Source§

impl FastSerialize for f64

Source§

fn write_to_buffer(&self, buffer: &mut Vec<u8>)

Source§

fn size_hint(&self) -> usize

Source§

impl FastSerialize for i8

Source§

fn write_to_buffer(&self, buffer: &mut Vec<u8>)

Source§

fn size_hint(&self) -> usize

Source§

impl FastSerialize for i16

Source§

fn write_to_buffer(&self, buffer: &mut Vec<u8>)

Source§

fn size_hint(&self) -> usize

Source§

impl FastSerialize for i32

Source§

fn write_to_buffer(&self, buffer: &mut Vec<u8>)

Source§

fn size_hint(&self) -> usize

Source§

impl FastSerialize for i64

Source§

fn write_to_buffer(&self, buffer: &mut Vec<u8>)

Source§

fn size_hint(&self) -> usize

Source§

impl FastSerialize for u8

Source§

fn write_to_buffer(&self, buffer: &mut Vec<u8>)

Source§

fn size_hint(&self) -> usize

Source§

impl FastSerialize for u16

Source§

fn write_to_buffer(&self, buffer: &mut Vec<u8>)

Source§

fn size_hint(&self) -> usize

Source§

impl FastSerialize for u32

Source§

fn write_to_buffer(&self, buffer: &mut Vec<u8>)

Source§

fn size_hint(&self) -> usize

Source§

impl FastSerialize for u64

Source§

fn write_to_buffer(&self, buffer: &mut Vec<u8>)

Source§

fn size_hint(&self) -> usize

Source§

impl FastSerialize for String

Source§

fn write_to_buffer(&self, buffer: &mut Vec<u8>)

Source§

fn size_hint(&self) -> usize

Implementors§