pub enum AllocLevel {
None,
Heap,
Any,
}Expand description
Allocation-capability tier, from least to most risk.
Variants§
None
No allocation of any kind — stack/static only.
Heap
The global heap allocator (Vec, Box, String, HashMap, …).
Any
Any allocation strategy, including custom allocators.
Implementations§
Source§impl AllocLevel
impl AllocLevel
Sourcepub const fn risk_level(self) -> u8
pub const fn risk_level(self) -> u8
A total ordering over risk — higher means riskier / less restricted.
Trait Implementations§
Source§impl Clone for AllocLevel
impl Clone for AllocLevel
Source§fn clone(&self) -> AllocLevel
fn clone(&self) -> AllocLevel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AllocLevel
Source§impl Debug for AllocLevel
impl Debug for AllocLevel
impl Eq for AllocLevel
Source§impl PartialEq for AllocLevel
impl PartialEq for AllocLevel
impl StructuralPartialEq for AllocLevel
Auto Trait Implementations§
impl Freeze for AllocLevel
impl RefUnwindSafe for AllocLevel
impl Send for AllocLevel
impl Sync for AllocLevel
impl Unpin for AllocLevel
impl UnsafeUnpin for AllocLevel
impl UnwindSafe for AllocLevel
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