1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 22:30:03 -04:00

[egui_glium] Add option not to persist app to file

This commit is contained in:
Emil Ernerfeldt
2020-10-19 20:25:05 +02:00
parent 43813a71eb
commit 8ccc36937f
5 changed files with 40 additions and 25 deletions

View File

@@ -75,6 +75,9 @@ pub trait TextureAllocator {
pub trait Storage {
fn get_string(&self, key: &str) -> Option<&str>;
fn set_string(&mut self, key: &str, value: String);
/// write-to-disk or similar
fn flush(&mut self);
}
/// Stores nothing.
@@ -86,6 +89,7 @@ impl Storage for DummyStorage {
None
}
fn set_string(&mut self, _key: &str, _value: String) {}
fn flush(&mut self) {}
}
#[cfg(feature = "serde_json")]