Struct egui::util::cache::FrameCache
source · pub struct FrameCache<Value, Computer> { /* private fields */ }
Expand description
Caches the results of a computation for one frame. If it is still used next frame, it is not recomputed. If it is not used next frame, it is evicted from the cache to save memory.
Implementations§
source§impl<Value, Computer> FrameCache<Value, Computer>
impl<Value, Computer> FrameCache<Value, Computer>
pub fn new(computer: Computer) -> Self
sourcepub fn evice_cache(&mut self)
pub fn evice_cache(&mut self)
Must be called once per frame to clear the cache.
source§impl<Value, Computer> FrameCache<Value, Computer>
impl<Value, Computer> FrameCache<Value, Computer>
Trait Implementations§
source§impl<Value: 'static + Send + Sync, Computer: 'static + Send + Sync> CacheTrait for FrameCache<Value, Computer>
impl<Value: 'static + Send + Sync, Computer: 'static + Send + Sync> CacheTrait for FrameCache<Value, Computer>
Auto Trait Implementations§
impl<Value, Computer> RefUnwindSafe for FrameCache<Value, Computer>where
Computer: RefUnwindSafe,
Value: RefUnwindSafe,
impl<Value, Computer> Send for FrameCache<Value, Computer>
impl<Value, Computer> Sync for FrameCache<Value, Computer>
impl<Value, Computer> Unpin for FrameCache<Value, Computer>
impl<Value, Computer> UnwindSafe for FrameCache<Value, Computer>where
Computer: UnwindSafe,
Value: UnwindSafe,
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