AllocatorDefault

Trait AllocatorDefault 

Source
pub trait AllocatorDefault:
    Allocator
    + Clone
    + Default {
    const DEFAULT: Self;
}
Expand description

A trait implemented by allocators supporting a constant initializer. This cannot use ConstDefault as it is not implemented for the external Global allocator.

Required Associated Constants§

Source

const DEFAULT: Self

The constant initializer for this allocator.

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.

Implementors§

Source§

impl AllocatorDefault for Global

Available on crate feature alloc only.
Source§

const DEFAULT: Self = Global

Source§

impl<'a> AllocatorDefault for Fixed<'a>

Source§

const DEFAULT: Self

Source§

impl<'a, A: AllocatorDefault> AllocatorDefault for Spill<'a, A>

Source§

const DEFAULT: Self

Source§

impl<A: AllocatorDefault> AllocatorDefault for ZeroizingAlloc<A>

Available on crate feature zeroize only.
Source§

const DEFAULT: Self