The current way to have a persistent app is to implement epi::App and use the feature persistence.
In particular, one must implement the method save.
save uses a default location given by:
But there is no way (as far as I can see) to change the default location.
Describe the solution you'd like
I would like to be able to choose where the data is stored.
Describe alternatives you've considered
I propose to exhibit the call to create a dyn epi::Storage, so people could change it.
We could add a method to the epi::App trait
fn storage(&self) -> dyn Storage { ... }
A default implementation is given by the current behaviour.
Additional context
A very simple use case is that I would like to store the app data in a Google drive folder, so I get "persistence" across devices too.
The current way to have a persistent app is to implement
epi::Appand use the featurepersistence.In particular, one must implement the method
save.saveuses a default location given by:Local Storageon the webdirectories_next::ProjectDirs::data_diron native.But there is no way (as far as I can see) to change the default location.
Describe the solution you'd like
I would like to be able to choose where the data is stored.
Describe alternatives you've considered
I propose to exhibit the call to create a dyn
epi::Storage, so people could change it.We could add a method to the
epi::ApptraitA default implementation is given by the current behaviour.
Additional context
A very simple use case is that I would like to store the app data in a Google drive folder, so I get "persistence" across devices too.