pub struct RetainedMemory { /* private fields */ }Implementations§
Source§impl RetainedMemory
impl RetainedMemory
Sourcepub fn try_grow_to(&self, bytes: usize) -> Result<()>
pub fn try_grow_to(&self, bytes: usize) -> Result<()>
Admits an absolute total high-water mark; this never shrinks the claim.
Concurrent incremental allocators must use try_grow_by.
Sourcepub fn try_grow_by(&self, additional: usize) -> Result<()>
pub fn try_grow_by(&self, additional: usize) -> Result<()>
Atomically admits an additional allocation peak without waiting.
Refusal leaves the claim unchanged. Use this for independent increments
through aliases; bytes() + try_grow_to() is not an atomic increment.
Trait Implementations§
Source§impl Clone for RetainedMemory
impl Clone for RetainedMemory
Auto Trait Implementations§
impl Freeze for RetainedMemory
impl RefUnwindSafe for RetainedMemory
impl Send for RetainedMemory
impl Sync for RetainedMemory
impl Unpin for RetainedMemory
impl UnsafeUnpin for RetainedMemory
impl UnwindSafe for RetainedMemory
Blanket Implementations§
impl<T> Allocation for T
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