#[non_exhaustive]pub struct MmapOptions {
pub mode: OpenMode,
pub initial_len: Option<u64>,
pub path: PathBuf,
}Expand description
Options for opening a MmapResource.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mode: OpenModeOpen mode controlling read/write behavior for existing files.
initial_len: Option<u64>Initial file size for new files. Ignored for existing files.
path: PathBufPath to the backing file.
Implementations§
Source§impl MmapOptions
impl MmapOptions
Sourcepub fn builder() -> MmapOptionsBuilder
pub fn builder() -> MmapOptionsBuilder
Create an instance of MmapOptions using the builder syntax
Source§impl MmapOptions
impl MmapOptions
Sourcepub fn new(path: PathBuf) -> Self
pub fn new(path: PathBuf) -> Self
Options for the given backing-file path with all other fields at
their builder defaults. For chains use MmapOptions::for_path.
Sourcepub fn for_path(path: PathBuf) -> MmapOptionsBuilder<SetPath>
pub fn for_path(path: PathBuf) -> MmapOptionsBuilder<SetPath>
Chainable counterpart to MmapOptions::new: returns a builder
with path set so callers can attach .mode(...) /
.initial_len(...) then .build().
Trait Implementations§
Source§impl Clone for MmapOptions
impl Clone for MmapOptions
Source§fn clone(&self) -> MmapOptions
fn clone(&self) -> MmapOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MmapOptions
impl RefUnwindSafe for MmapOptions
impl Send for MmapOptions
impl Sync for MmapOptions
impl Unpin for MmapOptions
impl UnsafeUnpin for MmapOptions
impl UnwindSafe for MmapOptions
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