pub struct LockManager { /* private fields */ }Expand description
The LockManager is used for cooperative access to pages in the system.
Before accessing the I/O layer you must get a read or write lock on the page you need to access. Only AFTER you have the lock you should ask for the page.
Implementations§
Source§impl LockManager
impl LockManager
pub fn new() -> LockManager
pub async fn read( &self, page_id: PageId, offset: PageOffset, ) -> OwnedRwLockReadGuard<(PageId, PageOffset)>
pub async fn write( &self, page_id: PageId, offset: PageOffset, ) -> OwnedRwLockWriteGuard<(PageId, PageOffset)>
Trait Implementations§
Source§impl Clone for LockManager
impl Clone for LockManager
Source§fn clone(&self) -> LockManager
fn clone(&self) -> LockManager
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 !RefUnwindSafe for LockManager
impl !UnwindSafe for LockManager
impl Freeze for LockManager
impl Send for LockManager
impl Sync for LockManager
impl Unpin for LockManager
impl UnsafeUnpin for LockManager
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