pub struct WriteBuffer { /* private fields */ }
Expand description
A buffer for writing codec data
Implementations§
Source§impl WriteBuffer
impl WriteBuffer
Sourcepub fn write_varint(&mut self, value: u64)
pub fn write_varint(&mut self, value: u64)
Writes a varint-encoded unsigned integer
pub fn remaining_mut(&mut self) -> usize
pub fn put_u8(&mut self, v: u8)
pub fn put_u16(&mut self, v: u16)
pub fn put_u32(&mut self, v: u32)
pub fn put_u64(&mut self, v: u64)
pub fn put_u128(&mut self, v: u128)
pub fn put_i8(&mut self, v: i8)
pub fn put_i16(&mut self, v: i16)
pub fn put_i32(&mut self, v: i32)
pub fn put_i64(&mut self, v: i64)
pub fn put_i128(&mut self, v: i128)
pub fn put_f32(&mut self, v: f32)
pub fn put_f64(&mut self, v: f64)
pub fn put_slice(&mut self, src: &[u8])
Trait Implementations§
Source§impl AsRef<[u8]> for WriteBuffer
impl AsRef<[u8]> for WriteBuffer
Source§impl Debug for WriteBuffer
impl Debug for WriteBuffer
Source§impl From<WriteBuffer> for Bytes
impl From<WriteBuffer> for Bytes
Source§fn from(buffer: WriteBuffer) -> Self
fn from(buffer: WriteBuffer) -> Self
Converts to this type from the input type.
Source§impl From<WriteBuffer> for Vec<u8>
impl From<WriteBuffer> for Vec<u8>
Source§fn from(buffer: WriteBuffer) -> Self
fn from(buffer: WriteBuffer) -> Self
Converts to this type from the input type.
Source§impl Writer for WriteBuffer
impl Writer for WriteBuffer
Source§fn write_u128(&mut self, value: u128)
fn write_u128(&mut self, value: u128)
Writes a u128 value
Source§fn write_i128(&mut self, value: i128)
fn write_i128(&mut self, value: i128)
Writes a i128 value
Source§fn write_varint(&mut self, value: u64)
fn write_varint(&mut self, value: u64)
Writes a varint-encoded integer
Source§fn write_bytes(&mut self, bytes: &[u8])
fn write_bytes(&mut self, bytes: &[u8])
Writes bytes with a length prefix
Source§fn write_fixed(&mut self, bytes: &[u8])
fn write_fixed(&mut self, bytes: &[u8])
Writes a fixed-size byte array
Source§fn write_bool(&mut self, value: bool)
fn write_bool(&mut self, value: bool)
Writes a boolean value
Source§fn write_option<T: Codec>(&mut self, value: &Option<T>)
fn write_option<T: Codec>(&mut self, value: &Option<T>)
Writes an option value
Auto Trait Implementations§
impl Freeze for WriteBuffer
impl RefUnwindSafe for WriteBuffer
impl Send for WriteBuffer
impl Sync for WriteBuffer
impl Unpin for WriteBuffer
impl UnwindSafe for WriteBuffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more