pub struct FileStorage { /* private fields */ }
Expand description
A key-value store backed by a RON file on disk. Used to restore egui state, glium window position/size and app state.
Implementations§
Source§impl FileStorage
impl FileStorage
Sourcepub fn from_ron_filepath(ron_filepath: impl Into<PathBuf>) -> Self
pub fn from_ron_filepath(ron_filepath: impl Into<PathBuf>) -> Self
Store the state in this .ron file.
Sourcepub fn from_app_name(app_name: &str) -> Option<Self>
pub fn from_app_name(app_name: &str) -> Option<Self>
Find a good place to put the files that the OS likes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileStorage
impl RefUnwindSafe for FileStorage
impl Send for FileStorage
impl Sync for FileStorage
impl Unpin for FileStorage
impl UnwindSafe for FileStorage
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