pub struct CacheConfig {
pub max_entries: usize,
pub disk_cache_dir: Option<PathBuf>,
pub persist_on_evict: bool,
}Expand description
Configuration for the mesh cache.
Build it with ..Default::default() for the fields you do not set, so the
deprecated fields below are not named:
use alice_sdf::cache::CacheConfig;
let config = CacheConfig { max_entries: 16, ..Default::default() };
assert_eq!(config.max_entries, 16);Fields§
§max_entries: usizeMaximum number of cached meshes in memory.
When an insert of a new key finds max_entries entries, the least
recently used one is evicted first. 0 means unbounded: nothing is
ever evicted and the cache grows with every distinct key.
disk_cache_dir: Option<PathBuf>not implemented: MeshCache never touches the disk; persist with crate::io::save_abm or ChunkedMeshCache
Not implemented: MeshCache never reads or writes this directory.
Deprecated since 5.0.0. For .abm persistence use
ChunkedMeshCache::persist_dirty / ChunkedMeshCache::load_chunk
or crate::io::save_abm directly.
persist_on_evict: boolnot implemented: evicted meshes are dropped; persist with crate::io::save_abm or ChunkedMeshCache
Not implemented: evicted meshes are dropped whatever this is set to.
Deprecated since 5.0.0, see Self::disk_cache_dir.
Trait Implementations§
Source§impl Clone for CacheConfig
impl Clone for CacheConfig
Source§impl Debug for CacheConfig
impl Debug for CacheConfig
Auto Trait Implementations§
impl Freeze for CacheConfig
impl RefUnwindSafe for CacheConfig
impl Send for CacheConfig
impl Sync for CacheConfig
impl Unpin for CacheConfig
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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