pub struct PipelineCache { /* private fields */ }Expand description
Pipeline cache for storing compiled pipelines
Implementations§
Source§impl PipelineCache
impl PipelineCache
Sourcepub fn new(cache_dir: impl AsRef<Path>, max_cache_size: usize) -> Result<Self>
pub fn new(cache_dir: impl AsRef<Path>, max_cache_size: usize) -> Result<Self>
Create a new pipeline cache
§Arguments
cache_dir- Directory to store cached pipelinesmax_cache_size- Maximum cache size in bytes (0 = unlimited)
Sourcepub fn default_cache() -> Result<Self>
pub fn default_cache() -> Result<Self>
Create a default pipeline cache in the system cache directory
Sourcepub fn total_cache_size(&self) -> usize
pub fn total_cache_size(&self) -> usize
Get the total cache size in bytes
Sourcepub fn entry_count(&self) -> usize
pub fn entry_count(&self) -> usize
Get the number of cached entries
Sourcepub fn set_enabled(&mut self, enabled: bool)
pub fn set_enabled(&mut self, enabled: bool)
Enable or disable the cache
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if the cache is enabled
Sourcepub fn stats(&self) -> CacheStats
pub fn stats(&self) -> CacheStats
Get cache statistics
Auto Trait Implementations§
impl Freeze for PipelineCache
impl !RefUnwindSafe for PipelineCache
impl Send for PipelineCache
impl Sync for PipelineCache
impl Unpin for PipelineCache
impl UnsafeUnpin for PipelineCache
impl !UnwindSafe for PipelineCache
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more