pub struct FileStorage { /* private fields */ }Expand description
An app’s storage kept in storage.json of a directory: the app’s data
directory (crate::EngineConfig::data_dir), or one the embedding app
chooses.
Implementations§
Trait Implementations§
Source§impl Drop for FileStorage
impl Drop for FileStorage
Source§impl StorageBackend for FileStorage
impl StorageBackend for FileStorage
Source§fn load(&self) -> Result<BTreeMap<String, String>, String>
fn load(&self) -> Result<BTreeMap<String, String>, String>
The entries kept, read once when the app first uses its storage; an
error leaves the app with none (logged).
Source§fn write(&self, change: StorageChange)
fn write(&self, change: StorageChange)
Keeps
change. Called on the engine thread: a backend that blocks
writes elsewhere, in order.Auto Trait Implementations§
impl !Freeze for FileStorage
impl Forget for FileStorage
impl Move for FileStorage
impl RefUnwindSafe for FileStorage
impl Send for FileStorage
impl Sync for FileStorage
impl Unpin for FileStorage
impl UnsafeUnpin 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