pub struct Buffer {
buffer: (raw_ptr, u64, u64), // ptr, capacity, size
}Fields
buffer: (raw_ptr, u64, u64)Implementations
pub fn new() -> Self
pub fn with_capacity(cap: u64) -> Self
pub fn append_raw(self, r: (raw_ptr, u64)) -> Buffer
pub fn ptr(self) -> raw_ptr
pub fn ptr(self) -> raw_ptr
Returns the pointer to the start of the buffer’s backing allocation.
pub fn capacity(self) -> u64
pub fn capacity(self) -> u64
Returns the number of bytes the buffer can hold without reallocating.
pub fn len(self) -> u64
pub fn len(self) -> u64
Returns the number of bytes currently written to the buffer.