pub struct MmapDriver { /* private fields */ }Expand description
Mmap-backed storage driver.
Uses mmap-io for file-backed storage with a lock-free SegQueue
for fast-path wait notifications.
Trait Implementations§
Source§impl Debug for MmapDriver
impl Debug for MmapDriver
Source§impl Driver for MmapDriver
impl Driver for MmapDriver
Source§type Options = MmapOptions
type Options = MmapOptions
Configuration needed to open/create a driver instance.
Source§fn open(opts: MmapOptions) -> StorageResult<(Self, DriverState)>
fn open(opts: MmapOptions) -> StorageResult<(Self, DriverState)>
Open or create a new driver from options. Read more
Source§impl DriverIo for MmapDriver
impl DriverIo for MmapDriver
Source§fn commit(&self, final_len: Option<u64>) -> StorageResult<()>
fn commit(&self, final_len: Option<u64>) -> StorageResult<()>
Finalize backing store (e.g. mmap: resize + reopen read-only; memory: truncate). Read more
Source§fn notify_write(&self, range: &Range<u64>)
fn notify_write(&self, range: &Range<u64>)
Publish a write range to the fast-path mechanism. Read more
Source§fn reactivate(&self) -> StorageResult<()>
fn reactivate(&self) -> StorageResult<()>
Reopen for writing (e.g. mmap: reopen as read-write; memory: no-op). Read more
Source§fn read_at(
&self,
offset: u64,
buf: &mut [u8],
_effective_len: u64,
) -> StorageResult<usize>
fn read_at( &self, offset: u64, buf: &mut [u8], _effective_len: u64, ) -> StorageResult<usize>
Read bytes at offset into
buf. Read moreSource§fn storage_len(&self) -> u64
fn storage_len(&self) -> u64
Physical storage length (for
read_at clamping).Source§fn try_fast_check(&self, range: &Range<u64>) -> bool
fn try_fast_check(&self, range: &Range<u64>) -> bool
Lock-free fast-path check before state mutex. Read more
Auto Trait Implementations§
impl !Freeze for MmapDriver
impl !RefUnwindSafe for MmapDriver
impl Send for MmapDriver
impl Sync for MmapDriver
impl Unpin for MmapDriver
impl UnsafeUnpin for MmapDriver
impl !UnwindSafe for MmapDriver
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