pub struct MmapConfig {
pub threshold: u64,
pub max_maps: usize,
pub temp_dir: Option<PathBuf>,
pub huge_file_threshold: u64,
pub stream_chunk_size: usize,
pub enable_streaming: bool,
}Expand description
memmap2 优化配置
Fields§
§threshold: u64使用 memmap 的最小文件大小阈值 (默认: 1MB)
max_maps: usize最大并发 mmap 映射数量 (默认: 8)
temp_dir: Option<PathBuf>临时文件目录 (默认: 系统临时目录)
huge_file_threshold: u64超大文件阈值 (默认: 100MB) - 超过此大小使用流式处理
stream_chunk_size: usize流式读取块大小 (默认: 8MB)
enable_streaming: bool是否启用流式处理 (默认: true)
Trait Implementations§
Source§impl Clone for MmapConfig
impl Clone for MmapConfig
Source§fn clone(&self) -> MmapConfig
fn clone(&self) -> MmapConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MmapConfig
impl Debug for MmapConfig
Auto Trait Implementations§
impl Freeze for MmapConfig
impl RefUnwindSafe for MmapConfig
impl Send for MmapConfig
impl Sync for MmapConfig
impl Unpin for MmapConfig
impl UnwindSafe for MmapConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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