pub struct Pager { /* private fields */ }Implementations§
Source§impl Pager
impl Pager
pub const CHECKSUM_METADATA_VERSION: u32 = 1
pub fn new<P: AsRef<Path>>(path: P, cache_capacity: usize) -> Result<Self>
pub fn new_in_memory(cache_capacity: usize) -> Result<Self>
pub fn read_page(&mut self, page_id: PageId) -> Result<Page>
pub fn write_page(&mut self, page: Page) -> Result<()>
pub fn allocate_page(&mut self) -> Result<PageId>
pub fn deallocate_page(&mut self, page_id: PageId) -> Result<()>
pub fn flush(&mut self) -> Result<()>
pub fn begin_transaction(&mut self) -> Result<()>
pub fn commit_transaction(&mut self) -> Result<()>
pub fn rollback_transaction(&mut self) -> Result<()>
pub fn transaction_active(&self) -> bool
pub fn begin_read(&mut self) -> Result<()>
pub fn end_read(&mut self) -> Result<()>
pub fn free_pages(&self) -> &[PageId] ⓘ
pub fn set_free_pages(&mut self, free_pages: Vec<PageId>)
pub fn checksum_entries(&self) -> Vec<(PageId, u32)>
pub fn journal_mode(&self) -> JournalMode
pub fn set_journal_mode(&mut self, journal_mode: JournalMode) -> Result<()>
pub fn checkpoint_wal(&mut self) -> Result<()>
pub fn replace_checksums(&mut self, checksums: HashMap<PageId, u32>)
pub fn file_len(&self) -> Result<u64>
pub fn allocated_page_count(&self) -> usize
pub fn fragmented_free_page_count(&self) -> usize
pub fn trailing_free_page_count(&self) -> usize
pub fn validate_integrity(&mut self) -> Result<PagerIntegrityReport>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pager
impl RefUnwindSafe for Pager
impl Send for Pager
impl Sync for Pager
impl Unpin for Pager
impl UnsafeUnpin for Pager
impl UnwindSafe for Pager
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