pub enum Location {
Cache,
Config,
Data,
}
Expand description
Where the data should be written to and read from
On desktop this determines which folder the file should be placed in (adhering to the XDG desktop specification), and on web it determines which various web storage APIs it should use.
Variants§
Cache
Cache should be used for short-lived data
Cached data has no lifetime guarantee, and should be expected to be cleared between runs of the program. On web, it is guaranteed when the user leaves the application and returns that the cache data will have been cleared.
Config
Config should store application behavior configs, and will be long-lived
Data
Data will store application data, and will be long-lived
Trait Implementations§
impl Copy for Location
impl Eq for Location
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
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