Struct wasmtime_cache::CacheConfig

source ·
pub struct CacheConfig { /* private fields */ }
Expand description

Global configuration for how the cache is managed

Implementations§

source§

impl CacheConfig

source

pub fn worker_event_queue_size(&self) -> u64

Returns $setting.

Panics if the cache is disabled.

source

pub fn baseline_compression_level(&self) -> i32

Returns $setting.

Panics if the cache is disabled.

source

pub fn optimized_compression_level(&self) -> i32

Returns $setting.

Panics if the cache is disabled.

source

pub fn optimized_compression_usage_counter_threshold(&self) -> u64

Returns $setting.

Panics if the cache is disabled.

source

pub fn cleanup_interval(&self) -> Duration

Returns $setting.

Panics if the cache is disabled.

source

pub fn optimizing_compression_task_timeout(&self) -> Duration

Returns $setting.

Panics if the cache is disabled.

source

pub fn allowed_clock_drift_for_files_from_future(&self) -> Duration

Returns $setting.

Panics if the cache is disabled.

source

pub fn file_count_soft_limit(&self) -> u64

Returns $setting.

Panics if the cache is disabled.

source

pub fn files_total_size_soft_limit(&self) -> u64

Returns $setting.

Panics if the cache is disabled.

source

pub fn file_count_limit_percent_if_deleting(&self) -> u8

Returns $setting.

Panics if the cache is disabled.

source

pub fn files_total_size_limit_percent_if_deleting(&self) -> u8

Returns $setting.

Panics if the cache is disabled.

source

pub fn enabled(&self) -> bool

Returns true if and only if the cache is enabled.

source

pub fn directory(&self) -> &PathBuf

Returns path to the cache directory.

Panics if the cache is disabled.

source

pub fn new_cache_disabled() -> Self

Creates a new set of configuration which represents a disabled cache

source

pub fn from_file(config_file: Option<&Path>) -> Result<Self>

Parses cache configuration from the file specified

source

pub fn cache_hits(&self) -> usize

Returns the number of cache hits seen so far

source

pub fn cache_misses(&self) -> usize

Returns the number of cache misses seen so far

Trait Implementations§

source§

impl Clone for CacheConfig

source§

fn clone(&self) -> CacheConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CacheConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for CacheConfig

source§

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§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,