pub struct MemoryMappingManager { /* private fields */ }
Expand description
Memory mapping manager for multiple files
Implementations§
Source§impl MemoryMappingManager
impl MemoryMappingManager
Sourcepub fn new(config: MemoryMappingConfig) -> Self
pub fn new(config: MemoryMappingConfig) -> Self
Create new memory mapping manager
Sourcepub fn unmap_file(&mut self, filepath: &PathBuf) -> SparseResult<()>
pub fn unmap_file(&mut self, filepath: &PathBuf) -> SparseResult<()>
Unmap a file
Sourcepub fn get_file(&mut self, filepath: &PathBuf) -> Option<&mut MemoryMappedFile>
pub fn get_file(&mut self, filepath: &PathBuf) -> Option<&mut MemoryMappedFile>
Get mapped file reference
Sourcepub fn get_stats(&self) -> &MemoryMappingStats
pub fn get_stats(&self) -> &MemoryMappingStats
Get statistics
Sourcepub fn flush_all(&self) -> SparseResult<()>
pub fn flush_all(&self) -> SparseResult<()>
Flush all mapped files
Sourcepub fn close_all(&mut self) -> SparseResult<()>
pub fn close_all(&mut self) -> SparseResult<()>
Close all mapped files
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemoryMappingManager
impl RefUnwindSafe for MemoryMappingManager
impl Send for MemoryMappingManager
impl Sync for MemoryMappingManager
impl Unpin for MemoryMappingManager
impl UnwindSafe for MemoryMappingManager
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more