pub struct MemoryPool { /* private fields */ }Expand description
A resolved, reservable limit within one physical resource.
Implementations§
Source§impl MemoryPool
impl MemoryPool
Sourcepub fn requested(&self) -> MemoryBudget
pub fn requested(&self) -> MemoryBudget
Requested budget specification.
Sourcepub fn high_water(&self) -> u64
pub fn high_water(&self) -> u64
Highest concurrent reservation observed by this pool.
Sourcepub fn reserve(&self, bytes: u64) -> MemoryResult<MemoryLease>
pub fn reserve(&self, bytes: u64) -> MemoryResult<MemoryLease>
Attempts to reserve bytes until the returned lease is dropped.
§Errors
Returns MemoryError::BudgetExceeded if the local or shared resource
limit lacks sufficient remaining capacity.
Sourcepub fn report(&self) -> MemoryPoolReport
pub fn report(&self) -> MemoryPoolReport
Returns a snapshot of this pool’s planning and usage.
Trait Implementations§
Source§impl Clone for MemoryPool
impl Clone for MemoryPool
Source§fn clone(&self) -> MemoryPool
fn clone(&self) -> MemoryPool
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 MemoryPool
impl RefUnwindSafe for MemoryPool
impl Send for MemoryPool
impl Sync for MemoryPool
impl Unpin for MemoryPool
impl UnsafeUnpin for MemoryPool
impl UnwindSafe for MemoryPool
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