pub struct CacheConfig {
pub tree_blocks: usize,
pub inodes: usize,
pub extent_maps: usize,
}Expand description
Capacities for the three caches a crate::Filesystem holds.
Pass to crate::Filesystem::open_with_caches /
crate::Filesystem::open_subvol_with_caches to override the
defaults — useful for memory-constrained embedders or
benchmarking the cold path.
All three values must be > 0; the underlying LRU caches reject
zero-capacity construction. Use CacheConfig::no_cache for the
minimum-viable single-entry caches.
Fields§
§tree_blocks: usizeNumber of tree blocks to cache (~16 KiB each on default nodesize). Default: 4096 (~64 MiB).
inodes: usizeNumber of parsed inode items to cache. Default: 4096.
extent_maps: usizeNumber of per-inode extent maps to cache. Default: 1024.
Implementations§
Source§impl CacheConfig
impl CacheConfig
Trait Implementations§
Source§impl Clone for CacheConfig
impl Clone for CacheConfig
Source§fn clone(&self) -> CacheConfig
fn clone(&self) -> CacheConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CacheConfig
impl Debug for CacheConfig
Source§impl Default for CacheConfig
impl Default for CacheConfig
impl Copy for CacheConfig
Auto Trait Implementations§
impl Freeze for CacheConfig
impl RefUnwindSafe for CacheConfig
impl Send for CacheConfig
impl Sync for CacheConfig
impl Unpin for CacheConfig
impl UnsafeUnpin for CacheConfig
impl UnwindSafe for CacheConfig
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