pub struct PagedStore<S: Store> { /* private fields */ }Expand description
A simple fixed-size page cache wrapper over any Store.
This is intentionally minimal (no eviction policy yet). It exists to decouple the engine’s random-access reads from the OS file descriptor and provide a hook for future buffer pool work.
Implementations§
Trait Implementations§
Source§impl<S: Store> Store for PagedStore<S>
impl<S: Store> Store for PagedStore<S>
fn len(&self) -> Result<u64, DbError>
fn read_exact_at(&mut self, offset: u64, buf: &mut [u8]) -> Result<(), DbError>
fn write_all_at(&mut self, offset: u64, buf: &[u8]) -> Result<(), DbError>
fn sync(&mut self) -> Result<(), DbError>
Source§fn truncate(&mut self, len: u64) -> Result<(), DbError>
fn truncate(&mut self, len: u64) -> Result<(), DbError>
Shrink or grow the logical file to
len bytes (used for crash recovery truncation).fn is_empty(&self) -> Result<bool, DbError>
Auto Trait Implementations§
impl<S> Freeze for PagedStore<S>where
S: Freeze,
impl<S> RefUnwindSafe for PagedStore<S>where
S: RefUnwindSafe,
impl<S> Send for PagedStore<S>where
S: Send,
impl<S> Sync for PagedStore<S>where
S: Sync,
impl<S> Unpin for PagedStore<S>where
S: Unpin,
impl<S> UnsafeUnpin for PagedStore<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for PagedStore<S>where
S: UnwindSafe,
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