pub enum OpenMode {
Auto,
ReadWrite,
ReadOnly,
}Expand description
Controls how MmapDriver opens the backing file.
Variants§
Auto
Auto-detect: existing files open as committed (read-only mmap), new files open as active (read-write mmap). Default behavior.
ReadWrite
Always read-write. Existing files are opened without truncation. Writes after commit transparently reopen the file as read-write. Use for files that are rewritten in place (e.g. index files).
ReadOnly
Always read-only. Existing files are committed; missing files are treated as empty committed resources. Writes are rejected.
Trait Implementations§
impl Copy for OpenMode
impl Eq for OpenMode
impl StructuralPartialEq for OpenMode
Auto Trait Implementations§
impl Freeze for OpenMode
impl RefUnwindSafe for OpenMode
impl Send for OpenMode
impl Sync for OpenMode
impl Unpin for OpenMode
impl UnsafeUnpin for OpenMode
impl UnwindSafe for OpenMode
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