Struct wasmtime_cache::CacheConfig
source · pub struct CacheConfig { /* private fields */ }
Expand description
Global configuration for how the cache is managed
Implementations§
source§impl CacheConfig
impl CacheConfig
sourcepub fn worker_event_queue_size(&self) -> u64
pub fn worker_event_queue_size(&self) -> u64
Returns $setting
.
Panics if the cache is disabled.
sourcepub fn baseline_compression_level(&self) -> i32
pub fn baseline_compression_level(&self) -> i32
Returns $setting
.
Panics if the cache is disabled.
sourcepub fn optimized_compression_level(&self) -> i32
pub fn optimized_compression_level(&self) -> i32
Returns $setting
.
Panics if the cache is disabled.
sourcepub fn optimized_compression_usage_counter_threshold(&self) -> u64
pub fn optimized_compression_usage_counter_threshold(&self) -> u64
Returns $setting
.
Panics if the cache is disabled.
sourcepub fn cleanup_interval(&self) -> Duration
pub fn cleanup_interval(&self) -> Duration
Returns $setting
.
Panics if the cache is disabled.
sourcepub fn optimizing_compression_task_timeout(&self) -> Duration
pub fn optimizing_compression_task_timeout(&self) -> Duration
Returns $setting
.
Panics if the cache is disabled.
sourcepub fn allowed_clock_drift_for_files_from_future(&self) -> Duration
pub fn allowed_clock_drift_for_files_from_future(&self) -> Duration
Returns $setting
.
Panics if the cache is disabled.
sourcepub fn file_count_soft_limit(&self) -> u64
pub fn file_count_soft_limit(&self) -> u64
Returns $setting
.
Panics if the cache is disabled.
sourcepub fn files_total_size_soft_limit(&self) -> u64
pub fn files_total_size_soft_limit(&self) -> u64
Returns $setting
.
Panics if the cache is disabled.
sourcepub fn file_count_limit_percent_if_deleting(&self) -> u8
pub fn file_count_limit_percent_if_deleting(&self) -> u8
Returns $setting
.
Panics if the cache is disabled.
sourcepub fn files_total_size_limit_percent_if_deleting(&self) -> u8
pub fn files_total_size_limit_percent_if_deleting(&self) -> u8
Returns $setting
.
Panics if the cache is disabled.
sourcepub fn directory(&self) -> &PathBuf
pub fn directory(&self) -> &PathBuf
Returns path to the cache directory.
Panics if the cache is disabled.
sourcepub fn new_cache_disabled() -> Self
pub fn new_cache_disabled() -> Self
Creates a new set of configuration which represents a disabled cache
sourcepub fn from_file(config_file: Option<&Path>) -> Result<Self>
pub fn from_file(config_file: Option<&Path>) -> Result<Self>
Parses cache configuration from the file specified
sourcepub fn cache_hits(&self) -> usize
pub fn cache_hits(&self) -> usize
Returns the number of cache hits seen so far
sourcepub fn cache_misses(&self) -> usize
pub fn cache_misses(&self) -> usize
Returns the number of cache misses seen so far
Trait Implementations§
source§impl Clone for CacheConfig
impl Clone for CacheConfig
source§fn clone(&self) -> CacheConfig
fn clone(&self) -> CacheConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CacheConfig
impl Debug for CacheConfig
source§impl<'de> Deserialize<'de> for CacheConfig
impl<'de> Deserialize<'de> for CacheConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for CacheConfig
impl RefUnwindSafe for CacheConfig
impl Send for CacheConfig
impl Sync for CacheConfig
impl Unpin 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)