pub enum AllocationIntent {
Frame,
Pool,
Heap,
}Expand description
Describes the intended lifetime and usage of an allocation.
This allows the allocator to route allocations to the optimal backend.
Variants§
Frame
Frame-temporary allocation.
Lives only until end_frame() is called.
Uses bump allocation - extremely fast.
Pool
Short-lived allocation from object pool.
Should be explicitly freed when done. Uses thread-local free lists.
Heap
Long-lived allocation.
Uses the system heap. Should be explicitly freed when done.
Trait Implementations§
Source§impl Clone for AllocationIntent
impl Clone for AllocationIntent
Source§fn clone(&self) -> AllocationIntent
fn clone(&self) -> AllocationIntent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AllocationIntent
impl Debug for AllocationIntent
Source§impl Default for AllocationIntent
impl Default for AllocationIntent
Source§impl Hash for AllocationIntent
impl Hash for AllocationIntent
Source§impl PartialEq for AllocationIntent
impl PartialEq for AllocationIntent
impl Copy for AllocationIntent
impl Eq for AllocationIntent
impl StructuralPartialEq for AllocationIntent
Auto Trait Implementations§
impl Freeze for AllocationIntent
impl RefUnwindSafe for AllocationIntent
impl Send for AllocationIntent
impl Sync for AllocationIntent
impl Unpin for AllocationIntent
impl UnwindSafe for AllocationIntent
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