Skip to content

Storage options: selecting where to save app #914

@saona-raimundo

Description

@saona-raimundo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions