pub unsafe trait BufferMut<T>: Buffer<T> {
// Required methods
fn as_mut_ptr(&mut self) -> NonNull<T>;
fn len(&self) -> usize;
fn capacity(&self) -> usize;
unsafe fn set_len(&mut self, len: usize) -> bool;
fn reserve(&mut self, _additional: usize) -> bool;
}Expand description
§Safety
as_mut_ptrmust point to the start of a memory buffer ofcapacity, with the firstlenelement initialized.- slice delimited by
as_mut_ptrandlenmust be the same asBuffer::as_slice