pub struct MemoryLock { /* private fields */ }
Expand description
A set of storage buffers that are ‘locked’ and cannot be used for allocations currently.
Implementations§
Source§impl MemoryLock
impl MemoryLock
Sourcepub fn is_locked(&self, storage: &StorageId) -> bool
pub fn is_locked(&self, storage: &StorageId) -> bool
Check whether a particular storage ID is locked currently.
Sourcepub fn add_locked(&mut self, storage: StorageId)
pub fn add_locked(&mut self, storage: StorageId)
Add a storage ID to be locked.
Sourcepub fn clear_locked(&mut self)
pub fn clear_locked(&mut self)
Remove all locks at once.
Trait Implementations§
Source§impl Debug for MemoryLock
impl Debug for MemoryLock
Source§impl Default for MemoryLock
impl Default for MemoryLock
Source§fn default() -> MemoryLock
fn default() -> MemoryLock
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MemoryLock
impl RefUnwindSafe for MemoryLock
impl Send for MemoryLock
impl Sync for MemoryLock
impl Unpin for MemoryLock
impl UnwindSafe for MemoryLock
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