Writer

Struct Writer 

Source
pub struct Writer<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Writer<'a>

Source

pub fn from_buffer(bf: &'a mut Vec<u8>) -> Writer<'a>

Source

pub fn dump(&self) -> Vec<u8>

Source

pub fn reset(&mut self)

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn reserve(&mut self, additional: usize)

Source

pub fn skip(&mut self, len: usize)

Source

pub fn set_bytes(&mut self, offset: usize, data: &[u8])

Source

pub fn write_bytes(&mut self, v: &[u8]) -> usize

Source

pub fn write_bool(&mut self, value: bool)

Source

pub fn write_u8(&mut self, value: u8)

Source

pub fn write_i8(&mut self, value: i8)

Source

pub fn write_u16(&mut self, value: u16)

Source

pub fn write_i16(&mut self, value: i16)

Source

pub fn write_u32(&mut self, value: u32)

Source

pub fn write_i32(&mut self, value: i32)

Source

pub fn write_f32(&mut self, value: f32)

Source

pub fn write_i64(&mut self, value: i64)

Source

pub fn write_f64(&mut self, value: f64)

Source

pub fn write_u64(&mut self, value: u64)

Source

pub fn write_usize(&mut self, value: usize)

Source

pub fn write_u128(&mut self, value: u128)

Source

pub fn write_varint32(&mut self, value: i32)

Source

pub fn write_varuint32(&mut self, value: u32)

Source

pub fn write_varint64(&mut self, value: i64)

Source

pub fn write_varuint64(&mut self, value: u64)

Source

pub fn write_varuint36_small(&mut self, value: u64)

Source

pub fn write_utf8_string(&mut self, s: &str)

Auto Trait Implementations§

§

impl<'a> Freeze for Writer<'a>

§

impl<'a> RefUnwindSafe for Writer<'a>

§

impl<'a> Send for Writer<'a>

§

impl<'a> Sync for Writer<'a>

§

impl<'a> Unpin for Writer<'a>

§

impl<'a> !UnwindSafe for Writer<'a>

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.