pub struct Packer<'d, 's> { /* private fields */ }Implementations§
Source§impl<'d, 's> Packer<'d, 's>
impl<'d, 's> Packer<'d, 's>
pub fn write_string(&mut self, string: &[u8]) -> Result<(), CapacityError>
pub fn write_int(&mut self, int: i32) -> Result<(), CapacityError>
pub fn write_data(&mut self, data: &[u8]) -> Result<(), CapacityError>
pub fn write_raw(&mut self, data: &[u8]) -> Result<(), CapacityError>
pub fn write_rest(&mut self, data: &[u8]) -> Result<(), CapacityError>
pub fn written(self) -> &'d [u8] ⓘ
Trait Implementations§
Source§impl<'r, 'd, 's> Buffer<'d> for &'r mut Packer<'d, 's>
impl<'r, 'd, 's> Buffer<'d> for &'r mut Packer<'d, 's>
Source§type Intermediate = BufferRefBuffer<'r, 'd, 's>
type Intermediate = BufferRefBuffer<'r, 'd, 's>
Intermediate result of converting the
T: Buffer into a BufferRef.Source§fn to_to_buffer_ref(self) -> Self::Intermediate
fn to_to_buffer_ref(self) -> Self::Intermediate
Converts the
T: Buffer into the intermediate step to BufferRef.Auto Trait Implementations§
impl<'d, 's> Freeze for Packer<'d, 's>
impl<'d, 's> RefUnwindSafe for Packer<'d, 's>
impl<'d, 's> Send for Packer<'d, 's>
impl<'d, 's> Sync for Packer<'d, 's>
impl<'d, 's> Unpin for Packer<'d, 's>
impl<'d, 's> !UnwindSafe for Packer<'d, 's>
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