pub struct MmapConfig {
pub file_path: PathBuf,
pub read_only: bool,
pub sync_on_write: bool,
pub cache_size: usize,
}Expand description
Configuration for memory-mapped storage.
Fields§
§file_path: PathBufFile path for storage
read_only: boolEnable read-only mode
sync_on_write: boolSync to disk on write
cache_size: usizeCache size (number of nodes to keep in memory)
Implementations§
Source§impl MmapConfig
impl MmapConfig
Sourcepub fn with_read_only(self, read_only: bool) -> Self
pub fn with_read_only(self, read_only: bool) -> Self
Set read-only mode.
Sourcepub fn with_sync_on_write(self, sync: bool) -> Self
pub fn with_sync_on_write(self, sync: bool) -> Self
Set sync on write.
Sourcepub fn with_cache_size(self, size: usize) -> Self
pub fn with_cache_size(self, size: usize) -> Self
Set cache size.
Trait Implementations§
Source§impl Clone for MmapConfig
impl Clone for MmapConfig
Source§fn clone(&self) -> MmapConfig
fn clone(&self) -> MmapConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MmapConfig
impl RefUnwindSafe for MmapConfig
impl Send for MmapConfig
impl Sync for MmapConfig
impl Unpin for MmapConfig
impl UnsafeUnpin for MmapConfig
impl UnwindSafe for MmapConfig
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