pub struct MetadataCacheConfig { /* private fields */ }Expand description
Initial metadata-cache settings for streaming file access.
This is the hdf5-pure counterpart to the memory-budget portion of HDF5’s
H5Pset_mdc_config: it bounds the bytes retained for parsed metadata reads
while a file is opened through crate::File::open_streaming_with_options.
Raw dataset payload reads use Source::read_exact_at and are not
admitted to this cache.
Implementations§
Source§impl MetadataCacheConfig
impl MetadataCacheConfig
Sourcepub const fn new(max_bytes: usize) -> Self
pub const fn new(max_bytes: usize) -> Self
Create a metadata cache with the given total byte budget.
Individual cached reads are capped at
DEFAULT_METADATA_CACHE_MAX_ENTRY_BYTES (64 KiB) by default so one large
heap or index block cannot monopolize the cache. Use
with_max_entry_bytes to change that.
Sourcepub const fn with_max_entry_bytes(self, max_entry_bytes: usize) -> Self
pub const fn with_max_entry_bytes(self, max_entry_bytes: usize) -> Self
Set the maximum size of a single metadata read admitted to the cache.
Sourcepub const fn max_entry_bytes(&self) -> usize
pub const fn max_entry_bytes(&self) -> usize
Return the maximum size of one cached metadata entry.
Sourcepub const fn is_enabled(&self) -> bool
pub const fn is_enabled(&self) -> bool
Whether metadata read caching is enabled.
Trait Implementations§
Source§impl Clone for MetadataCacheConfig
impl Clone for MetadataCacheConfig
Source§fn clone(&self) -> MetadataCacheConfig
fn clone(&self) -> MetadataCacheConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more