pub struct FileStorage { /* private fields */ }Implementations§
Source§impl FileStorage
impl FileStorage
pub fn new(file: File) -> Self
pub fn read_header(&mut self) -> Result<DbHeader>
pub fn write_header(&mut self, header: &DbHeader) -> Result<()>
pub fn flush(&mut self) -> Result<()>
Sourcepub fn seek_to(&mut self, offset: u64) -> Result<()>
pub fn seek_to(&mut self, offset: u64) -> Result<()>
Low-level byte I/O helpers used by the Pager to bypass the per-page
encoding when it’s managing its own raw buffers.
pub fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>
pub fn write_all(&mut self, buf: &[u8]) -> Result<()>
Sourcepub fn truncate_to_pages(&mut self, page_count: u32) -> Result<()>
pub fn truncate_to_pages(&mut self, page_count: u32) -> Result<()>
Shrinks the backing file to page_count pages. Any bytes beyond the
new length are discarded.
Auto Trait Implementations§
impl Freeze for FileStorage
impl RefUnwindSafe for FileStorage
impl Send for FileStorage
impl Sync for FileStorage
impl Unpin for FileStorage
impl UnsafeUnpin for FileStorage
impl UnwindSafe for FileStorage
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