egui/cache/
cache_trait.rs

1/// A cache, storing some value for some length of time.
2#[allow(clippy::len_without_is_empty)]
3pub trait CacheTrait: 'static + Send + Sync {
4    /// Call once per frame to evict cache.
5    fn update(&mut self);
6
7    /// Number of values currently in the cache.
8    fn len(&self) -> usize;
9
10    fn as_any_mut(&mut self) -> &mut dyn std::any::Any;
11}