Struct wasmtime_cache::CacheConfig
source · [−]pub struct CacheConfig { /* private fields */ }
Expand description
Global configuration for how the cache is managed
Implementations
sourceimpl 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
sourceimpl Clone for CacheConfig
impl Clone for CacheConfig
sourcefn clone(&self) -> CacheConfig
fn clone(&self) -> CacheConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CacheConfig
impl Debug for CacheConfig
sourceimpl<'de> Deserialize<'de> for CacheConfig
impl<'de> Deserialize<'de> for CacheConfig
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for CacheConfig
impl Send for CacheConfig
impl Sync for CacheConfig
impl Unpin for CacheConfig
impl UnwindSafe for CacheConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more