mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-14 00:00:13 +02:00
Implement buffer traits on Vec<u8>, &[u8], Cursor
This commit is contained in:
@@ -9,6 +9,9 @@ use std::{cmp, ptr};
|
||||
*/
|
||||
|
||||
/// A `Buf` backed by a contiguous region of memory.
|
||||
///
|
||||
/// This `Buf` is better suited for cases where there is a clear delineation
|
||||
/// between reading and writing.
|
||||
pub struct ByteBuf {
|
||||
mem: alloc::MemRef,
|
||||
cap: u32,
|
||||
|
||||
Reference in New Issue
Block a user