pub struct WgpuResidentArena { /* private fields */ }Expand description
Bounded resident arena with oldest-first eviction.
Implementations§
Source§impl WgpuResidentArena
impl WgpuResidentArena
Sourcepub fn allocate(&mut self, bytes: u64) -> Result<WgpuArenaAllocation, String>
pub fn allocate(&mut self, bytes: u64) -> Result<WgpuArenaAllocation, String>
Allocates resident bytes, evicting older allocations when necessary.
Sourcepub fn contains(&self, id: WgpuAllocationId) -> bool
pub fn contains(&self, id: WgpuAllocationId) -> bool
Returns whether an allocation is still resident.
Sourcepub fn snapshot(&self) -> WgpuArenaSnapshot
pub fn snapshot(&self) -> WgpuArenaSnapshot
Returns current arena pressure.
Trait Implementations§
Source§impl Clone for WgpuResidentArena
impl Clone for WgpuResidentArena
Source§fn clone(&self) -> WgpuResidentArena
fn clone(&self) -> WgpuResidentArena
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 moreAuto Trait Implementations§
impl Freeze for WgpuResidentArena
impl RefUnwindSafe for WgpuResidentArena
impl Send for WgpuResidentArena
impl Sync for WgpuResidentArena
impl Unpin for WgpuResidentArena
impl UnsafeUnpin for WgpuResidentArena
impl UnwindSafe for WgpuResidentArena
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