pub struct MemoryMapManager { /* private fields */ }Available on crate feature
mmap only.Expand description
Memory mapping manager for handling multiple archives
Implementations§
Source§impl MemoryMapManager
impl MemoryMapManager
Sourcepub fn new(
config: MemoryMapConfig,
security_limits: SecurityLimits,
session_tracker: Arc<SessionTracker>,
) -> Self
pub fn new( config: MemoryMapConfig, security_limits: SecurityLimits, session_tracker: Arc<SessionTracker>, ) -> Self
Create a new memory mapping manager
Sourcepub fn create_mapping<P: AsRef<Path>>(
&mut self,
path: P,
) -> Result<MemoryMappedArchive>
pub fn create_mapping<P: AsRef<Path>>( &mut self, path: P, ) -> Result<MemoryMappedArchive>
Create a memory-mapped archive
Sourcepub fn record_fallback(&mut self)
pub fn record_fallback(&mut self)
Record a fallback operation
Sourcepub fn global_stats(&self) -> &MemoryMapStats
pub fn global_stats(&self) -> &MemoryMapStats
Get global statistics
Sourcepub fn should_attempt_mapping(&self, file_size: u64) -> bool
pub fn should_attempt_mapping(&self, file_size: u64) -> bool
Check if memory mapping should be attempted based on current state
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemoryMapManager
impl RefUnwindSafe for MemoryMapManager
impl Send for MemoryMapManager
impl Sync for MemoryMapManager
impl Unpin for MemoryMapManager
impl UnwindSafe for MemoryMapManager
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