pub enum Allocator {
NotSet = 0,
Default = 1,
Debug = 2,
Malloc = 3,
MallocDebug = 4,
PyMalloc = 5,
PyMallocDebug = 6,
}
Expand description
Name of the Python memory allocators.
See https://docs.python.org/3/c-api/init_config.html#c.PyPreConfig.allocator.
Serialization type: string
Variants§
NotSet = 0
Don’t change memory allocators (use defaults).
Serialized value: not-set
Default = 1
Default memory allocators.
Serialized value: default
Debug = 2
Default memory allocators with debug hooks.
Serialized value: debug
Malloc = 3
Use malloc()
from the C library.
Serialized value: malloc
MallocDebug = 4
Force usage of malloc()
with debug hooks.
Serialized value: malloc-debug
PyMalloc = 5
Python pymalloc
allocator.
Serialized value: py-malloc
PyMallocDebug = 6
Python pymalloc
allocator with debug hooks.
Serialized value: py-malloc-debug
Trait Implementations§
impl Copy for Allocator
impl Eq for Allocator
impl StructuralPartialEq for Allocator
Auto Trait Implementations§
impl Freeze for Allocator
impl RefUnwindSafe for Allocator
impl Send for Allocator
impl Sync for Allocator
impl Unpin for Allocator
impl UnwindSafe for Allocator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more