pub trait VecConfigAlloc<T>: VecConfig {
type Alloc: Allocator;
// Required methods
fn allocator(buf: &Self::Buffer<T>) -> &Self::Alloc;
fn buffer_from_parts(
data: NonNull<T>,
length: Self::Index,
capacity: Self::Index,
alloc: Self::Alloc,
) -> Self::Buffer<T>;
fn buffer_into_parts(
buffer: Self::Buffer<T>,
) -> (NonNull<T>, Self::Index, Self::Index, Self::Alloc);
}
Expand description
Configuration for Vec
types supporting an allocator.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.