[][src]Trait tree_buf::internal::reader_writer::WriterStream

pub trait WriterStream {
    type Options: EncodeOptions;
    fn write_with_id<T: TypeId>(&mut self, f: impl FnOnce(&mut Self) -> T) -> T;
fn write_with_len<T>(&mut self, f: impl FnOnce(&mut Self) -> T) -> T;
fn bytes(&mut self) -> &mut Vec<u8>;
fn options(&self) -> &Self::Options; fn restore_if_void<T: TypeId>(
        &mut self,
        f: impl FnOnce(&mut Self) -> T
    ) -> T { ... }
fn reserve_and_write_with_varint(
        &mut self,
        max: u64,
        f: impl FnOnce(&mut Self) -> u64
    ) { ... } }

Associated Types

Loading content...

Required methods

fn write_with_id<T: TypeId>(&mut self, f: impl FnOnce(&mut Self) -> T) -> T

fn write_with_len<T>(&mut self, f: impl FnOnce(&mut Self) -> T) -> T

fn bytes(&mut self) -> &mut Vec<u8>

fn options(&self) -> &Self::Options

Loading content...

Provided methods

fn restore_if_void<T: TypeId>(&mut self, f: impl FnOnce(&mut Self) -> T) -> T

fn reserve_and_write_with_varint(
    &mut self,
    max: u64,
    f: impl FnOnce(&mut Self) -> u64
)

Loading content...

Implementors

impl<'a, O: EncodeOptions> WriterStream for VecWriterStream<'a, O>[src]

type Options = O

Loading content...