Struct membuffer::MemBufferWriter[][src]

pub struct MemBufferWriter { /* fields omitted */ }

The Writer class which sets up the schema and writes it into the memory when finished building

Implementations

impl MemBufferWriter[src]

pub fn new() -> MemBufferWriter[src]

Creates a new empty memory format writer

pub fn add_string_entry(&mut self, name: &str, content: &str)[src]

Adds a new string entry to the serializer

pub fn add_i32_entry(&mut self, name: &str, content: i32)[src]

Adds a new i32 entry to the serializer

pub fn add_vec_u8_entry(&mut self, name: &str, content: &[u8])[src]

Adds a new vector to the serializer

pub fn add_vec_u64_entry(&mut self, name: &str, content: &[u64])[src]

Adds a u64 vector to the entry

pub fn finalize(&self) -> Vec<u8>[src]

Finalize the schema and return the memory slice holding the whole vector

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.