pub struct StorageOpenOptions { /* private fields */ }Expand description
Parameters from which a storage object can be constructed.
Implementations§
Source§impl StorageOpenOptions
impl StorageOpenOptions
Sourcepub fn direct(self, direct: bool) -> Self
pub fn direct(self, direct: bool) -> Self
Whether to bypass the host page cache (if applicable).
Sourcepub fn write_dontcache(self, write_dontcache: bool) -> Self
Available on Linux and (GNU or musl) only.
pub fn write_dontcache(self, write_dontcache: bool) -> Self
GNU/musl Linux-only: whether buffered writes should avoid remaining in the host page cache.
This is a best-effort per-write hint. It requires writable, buffered storage and is
rejected when combined with read-only or direct I/O. Unsupported kernels and filesystems
are detected from the write syscall itself, after which writes continue without the hint.
This hint neither bounds dirty memory nor changes the storage durability contract.
Dynamically linked GNU builds require glibc 2.26 or newer for pwritev2().
Sourcepub fn get_filename(&self) -> Option<&Path>
pub fn get_filename(&self) -> Option<&Path>
Get the set filename (if any).
Sourcepub fn get_writable(&self) -> bool
pub fn get_writable(&self) -> bool
Return the set writable state.
Sourcepub fn get_direct(&self) -> bool
pub fn get_direct(&self) -> bool
Return the set direct state.
Sourcepub fn get_write_dontcache(&self) -> bool
Available on Linux and (GNU or musl) only.
pub fn get_write_dontcache(&self) -> bool
GNU/musl Linux-only: return whether buffered writes should avoid remaining in the host page cache.
Trait Implementations§
Source§impl Clone for StorageOpenOptions
impl Clone for StorageOpenOptions
Source§fn clone(&self) -> StorageOpenOptions
fn clone(&self) -> StorageOpenOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more