This moves `egui::util::cache` to `egui::cache` (the old path is
deprecated, but still works).
It also adds the `FramePublisher` helper, which can be used to publish a
value which will be retained for this frame and the next:
``` rs
pub type MyPublisher = egui::cache::FramePublisher<MyKey, MyValue>;
// Publish:
ctx.memory_mut(|mem| {
mem.caches.cache::<MyPublisher>().set(key, value);
});
// Retrieve:
let value: Option<MyValue> = ctx.memory_mut(|mem| {
mem.caches
.cache::<MyPublisher>()
.get(key)
.clone()
})
```
|
||
|---|---|---|
| .. | ||
| ecolor | ||
| eframe | ||
| egui | ||
| egui-wgpu | ||
| egui-winit | ||
| egui_demo_app | ||
| egui_demo_lib | ||
| egui_extras | ||
| egui_glow | ||
| egui_kittest | ||
| egui_plot | ||
| egui_web | ||
| emath | ||
| epaint | ||
| epaint_default_fonts | ||