To do anything with a logical page of data, we must first attempt to read/write lock the page, which will give back a ReadPageGuard or a WritePageGuard, depending on which mode we attempt to lock the page in.
(When we get to hybrid latches, there will also potentially be an optimistic read page guard, whatever that means...)
Right now, all you can do is dereference a page guard through Deref and DerefMut to access the underlying [u8] slice. While that is sufficient for most things, there are still methods that we should implement on these guards.
WritePageGuard:
- Flush / Sync (write data out to disk)
- Evict (flush and give up ownership of the underlying
Frame)
- Downgrade
ReadPageGuard:
- Upgrade? (into a
WritePageGuard)?