Skip to main content

ComputerMut

Trait ComputerMut 

Source
pub trait ComputerMut<Key, Value>:
    'static
    + Send
    + Sync {
    // Required method
    fn compute(&mut self, key: Key) -> Value;
}
Available on crate feature egui only.
Expand description

Something that does an expensive computation that we want to cache to save us from recomputing it each frame.

Required Methods§

Source

fn compute(&mut self, key: Key) -> Value

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§