Trait BufGuard

pub trait BufGuard<T>

Abstracts owned memory buffer, so that sort code can live in core where no allocation is possible. This trait can then be implemented in a place that has access to allocation.

Required Methods

fn with_capacity(capacity: usize) -> Self

Creates new buffer that holds at least capacity memory.

fn as_uninit_slice_mut(&mut self) -> &mut [MaybeUninit<T>]

Returns mutable access to uninitialized memory owned by the buffer.