Struct rustdb::pstore::AccessPagedData
source · pub struct AccessPagedData {
pub spd: Arc<SharedPagedData>,
/* private fields */
}
Expand description
Access to shared paged data.
Fields§
§spd: Arc<SharedPagedData>
Shared Page Data.
Implementations§
source§impl AccessPagedData
impl AccessPagedData
sourcepub fn new_reader(spd: Arc<SharedPagedData>) -> Self
pub fn new_reader(spd: Arc<SharedPagedData>) -> Self
Construct access to a virtual read-only copy of the database logical pages.
sourcepub fn new_writer(spd: Arc<SharedPagedData>) -> Self
pub fn new_writer(spd: Arc<SharedPagedData>) -> Self
Construct access to the database logical pages.
sourcepub fn stash(&self) -> MutexGuard<'_, Stash>
pub fn stash(&self) -> MutexGuard<'_, Stash>
Get locked guard of stash.
sourcepub fn alloc_page(&self) -> u64
pub fn alloc_page(&self) -> u64
Allocate a logical page.
sourcepub fn compress(&self, size: usize, saving: usize) -> bool
pub fn compress(&self, size: usize, saving: usize) -> bool
Check whether compressing a page is worthwhile.
sourcepub fn save(&self, op: SaveOp) -> usize
pub fn save(&self, op: SaveOp) -> usize
Commit changes to underlying file ( or rollback logical page allocations ).
sourcepub fn renumber_page(&self, lpnum: u64) -> u64
pub fn renumber_page(&self, lpnum: u64) -> u64
Renumber a page.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AccessPagedData
impl !RefUnwindSafe for AccessPagedData
impl Send for AccessPagedData
impl Sync for AccessPagedData
impl Unpin for AccessPagedData
impl !UnwindSafe for AccessPagedData
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