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
sourceimpl<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.
sourceimpl<Value, Computer> FrameCache<Value, Computer>
impl<Value, Computer> FrameCache<Value, Computer>
Trait Implementations
sourceimpl<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> where
Computer: Send,
Value: Send,
impl<Value, Computer> Sync for FrameCache<Value, Computer> where
Computer: Sync,
Value: Sync,
impl<Value, Computer> Unpin for FrameCache<Value, Computer> where
Computer: Unpin,
Value: Unpin,
impl<Value, Computer> UnwindSafe for FrameCache<Value, Computer> where
Computer: UnwindSafe,
Value: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more