pub struct MemoryMappedFileBuilder { /* private fields */ }
Expand description
Builder for MemoryMappedFile construction with options.
Implementations§
Source§impl MemoryMappedFileBuilder
impl MemoryMappedFileBuilder
Sourcepub fn size(self, size: u64) -> Self
pub fn size(self, size: u64) -> Self
Specify the size (required for create/ReadWrite new files).
Sourcepub fn flush_policy(self, policy: FlushPolicy) -> Self
pub fn flush_policy(self, policy: FlushPolicy) -> Self
Specify the flush policy.
Sourcepub fn touch_hint(self, hint: TouchHint) -> Self
pub fn touch_hint(self, hint: TouchHint) -> Self
Specify when to touch (prewarm) memory pages.
Sourcepub fn huge_pages(self, enable: bool) -> Self
pub fn huge_pages(self, enable: bool) -> Self
Request Huge Pages (Linux MAP_HUGETLB). No-op on non-Linux platforms.
Sourcepub fn create(self) -> Result<MemoryMappedFile>
pub fn create(self) -> Result<MemoryMappedFile>
Create a new mapping; for ReadWrite requires size for creation.
Sourcepub fn open(self) -> Result<MemoryMappedFile>
pub fn open(self) -> Result<MemoryMappedFile>
Open an existing file with provided mode (size ignored).
Auto Trait Implementations§
impl Freeze for MemoryMappedFileBuilder
impl RefUnwindSafe for MemoryMappedFileBuilder
impl Send for MemoryMappedFileBuilder
impl Sync for MemoryMappedFileBuilder
impl Unpin for MemoryMappedFileBuilder
impl UnwindSafe for MemoryMappedFileBuilder
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