pub struct OutputBuffer { /* private fields */ }Expand description
A growable output buffer for accumulating byte data.
Implementations§
Source§impl OutputBuffer
impl OutputBuffer
pub fn new() -> Self
pub fn with_capacity(cap: usize) -> Self
pub fn write_bytes(&mut self, bytes: &[u8])
pub fn write_str(&mut self, s: &str)
pub fn write_u8(&mut self, v: u8)
pub fn write_u32_le(&mut self, v: u32)
pub fn flush(&mut self) -> Vec<u8> ⓘ
pub fn peek(&self) -> &[u8] ⓘ
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn flush_count(&self) -> u32
pub fn clear(&mut self)
pub fn capacity(&self) -> usize
pub fn as_str_lossy(&self) -> Cow<'_, str>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OutputBuffer
impl RefUnwindSafe for OutputBuffer
impl Send for OutputBuffer
impl Sync for OutputBuffer
impl Unpin for OutputBuffer
impl UnsafeUnpin for OutputBuffer
impl UnwindSafe for OutputBuffer
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