pub(crate) struct Buf {
buf: Vec<u8>,
pos: usize,
}
Fields§
§buf: Vec<u8>
§pos: usize
Implementations§
source§impl Buf
impl Buf
pub(crate) fn with_capacity(n: usize) -> Buf
pub(crate) fn is_empty(&self) -> bool
pub(crate) fn len(&self) -> usize
pub(crate) fn copy_to(&mut self, dst: &mut ReadBuf<'_>) -> usize
pub(crate) fn copy_from(&mut self, src: &[u8], max_buf_size: usize) -> usize
pub(crate) fn bytes(&self) -> &[u8] ⓘ
pub(crate) fn ensure_capacity_for( &mut self, bytes: &ReadBuf<'_>, max_buf_size: usize, )
pub(crate) fn read_from<T: Read>(&mut self, rd: &mut T) -> Result<usize>
pub(crate) fn write_to<T: Write>(&mut self, wr: &mut T) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Buf
impl RefUnwindSafe for Buf
impl Send for Buf
impl Sync for Buf
impl Unpin for Buf
impl UnwindSafe for Buf
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