Struct easy_mmap::EasyMmapBuilder
source · [−]pub struct EasyMmapBuilder<T> { /* private fields */ }
Expand description
The builder class for the EasyMmap struct. Provides an easy-to-use interface to create a new EasyMmap struct.
Implementations
sourceimpl<'a, T> EasyMmapBuilder<T>
impl<'a, T> EasyMmapBuilder<T>
sourcepub fn new() -> EasyMmapBuilder<T>
pub fn new() -> EasyMmapBuilder<T>
Creates a new EasyMmapBuilder struct.
sourcepub fn build(self) -> EasyMmap<'a, T> where
T: Copy,
pub fn build(self) -> EasyMmap<'a, T> where
T: Copy,
Builds the memory map with the given specifications. If the file has been specified, its size will be set to the requirements of the map.
sourcepub fn file(self, file: File) -> EasyMmapBuilder<T>
pub fn file(self, file: File) -> EasyMmapBuilder<T>
Passes the ownership of the file to the memory map.
sourcepub fn capacity(self, capacity: usize) -> EasyMmapBuilder<T>
pub fn capacity(self, capacity: usize) -> EasyMmapBuilder<T>
Sets the capacity that the mapped region must have.
This capacity must be the number of objects of type T
that can be stored in the memory map.
sourcepub fn options(self, options: &[MapOption]) -> EasyMmapBuilder<T>
pub fn options(self, options: &[MapOption]) -> EasyMmapBuilder<T>
Batch sets the options that the mapped region must have.
sourcepub fn add_option(self, option: MapOption) -> EasyMmapBuilder<T>
pub fn add_option(self, option: MapOption) -> EasyMmapBuilder<T>
Adds an individual option.
pub fn readable(self) -> EasyMmapBuilder<T>
pub fn writable(self) -> EasyMmapBuilder<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for EasyMmapBuilder<T> where
T: RefUnwindSafe,
impl<T> !Send for EasyMmapBuilder<T>
impl<T> !Sync for EasyMmapBuilder<T>
impl<T> Unpin for EasyMmapBuilder<T> where
T: Unpin,
impl<T> UnwindSafe for EasyMmapBuilder<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more