pub enum Buffer<'a> {
Vector(&'a mut Vec<u8>),
Slice(&'a mut [u8]),
Bytes(&'a mut BytesMut),
}
Expand description
Buffer that can be used to write data into.
Variants§
Vector(&'a mut Vec<u8>)
A Vec<u8>
acts as a buffer.
Slice(&'a mut [u8])
A byte slice acts as a buffer.
Bytes(&'a mut BytesMut)
A BytesMut
acts as a buffer.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Buffer<'a>
impl<'a> RefUnwindSafe for Buffer<'a>
impl<'a> Send for Buffer<'a>
impl<'a> Sync for Buffer<'a>
impl<'a> Unpin for Buffer<'a>
impl<'a> !UnwindSafe for Buffer<'a>
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