Trait egui::cache::CacheTrait

source ·
pub trait CacheTrait:
    'static
    + Send
    + Sync {
    // Required methods
    fn update(&mut self);
    fn len(&self) -> usize;
    fn as_any_mut(&mut self) -> &mut dyn Any;
}
Expand description

A cache, storing some value for some length of time.

Required Methods§

source

fn update(&mut self)

Call once per frame to evict cache.

source

fn len(&self) -> usize

Number of values currently in the cache.

source

fn as_any_mut(&mut self) -> &mut dyn Any

Implementors§

source§

impl<Key, Value> CacheTrait for FramePublisher<Key, Value>
where Key: 'static + Eq + Hash + Send + Sync, Value: 'static + Send + Sync,

source§

impl<Value: 'static + Send + Sync, Computer: 'static + Send + Sync> CacheTrait for FrameCache<Value, Computer>