pub struct ByteBuffer { /* private fields */ }
Implementations§
Source§impl ByteBuffer
impl ByteBuffer
Sourcepub fn new() -> ByteBuffer
pub fn new() -> ByteBuffer
Create an empty buffer.
Sourcepub fn from_seq(seq: Bytes) -> ByteBuffer
pub fn from_seq(seq: Bytes) -> ByteBuffer
Create a buffer from Bytes
.
Sourcepub fn concat_owned(self, seq: Bytes) -> ByteBuffer
pub fn concat_owned(self, seq: Bytes) -> ByteBuffer
Add a new chunk of Bytes
to this ByteBuffer
.
Sourcepub fn split_off(self, len: usize) -> (Bytes, ByteBuffer)
pub fn split_off(self, len: usize) -> (Bytes, ByteBuffer)
Split off num
bytes and return the Bytes
.
Sourcepub fn into_bytes(self) -> Bytes
pub fn into_bytes(self) -> Bytes
Get the buffer a single Bytes
object (efficient, consuming the buffer).
Trait Implementations§
Source§impl Clone for ByteBuffer
impl Clone for ByteBuffer
Source§fn clone(&self) -> ByteBuffer
fn clone(&self) -> ByteBuffer
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ByteBuffer
impl RefUnwindSafe for ByteBuffer
impl Send for ByteBuffer
impl Sync for ByteBuffer
impl Unpin for ByteBuffer
impl UnwindSafe for ByteBuffer
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