pub trait AllocatorNightly: Allocator { }🔬This is a nightly-only experimental API. (
allocator_ext #163177)Expand description
Allocator marker trait that is only implemented stably for Global.
This trait is used as a bound whenever a function constructing
a type with an #[unstable] A: Allocator = Global parameter
may be callable for A != Global.
This is to prevent stable code from e.g. constructing Arc<T, NotGlobal>
using the From<Box<T, A>> for Arc<T, A> impl.
Note that this trait will be removed in the future, but downstream allocators should still feel free to implement it on nightly, to allow use of all containers with unstable allocator support.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".