pub unsafe trait GlobalAllocator: Allocator {
// Required methods
fn __do_not_implement();
fn clone_alloc<T>(alloc: &Self::Alloc<T>) -> Self::Alloc<T>;
}Expand description
Required Methods§
Sourcefn __do_not_implement()
fn __do_not_implement()
Do not implement this trait. It is internal to Musli and will change.
Sourcefn clone_alloc<T>(alloc: &Self::Alloc<T>) -> Self::Alloc<T>
fn clone_alloc<T>(alloc: &Self::Alloc<T>) -> Self::Alloc<T>
Clone an allocation.
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§
impl GlobalAllocator for Global
impl<const BUF: usize> GlobalAllocator for &DefaultAllocator<'_, BUF>
Available on crate feature
alloc only.