pub struct WriteableBytes { /* private fields */ }Expand description
A writeable Bytes.
Has a special allocation method for optimized usage in Kvarn.
Implementations§
source§impl WriteableBytes
 
impl WriteableBytes
sourcepub fn new() -> Self
 
pub fn new() -> Self
Creates a new writeable buffer. Consider using
Self::with_capacity() if you can estimate the capacity needed.
sourcepub fn with_capacity(capacity: usize) -> Self
 
pub fn with_capacity(capacity: usize) -> Self
Crates a new writeable buffer with a specified capacity.
sourcepub fn into_inner(self) -> BytesMut
 
pub fn into_inner(self) -> BytesMut
Turns self into BytesMut when you are done writing.