tauri-apps / tauri-apps/plugins-workspace
[docs] Add more documentation as well as behaviour
Open
plugin: store
type: documentation
v1
- Dominant language
- Rust
- Stars
- 1.8k
- Forks
- 602
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 9
Description
The docs is not clear that data is written to storage only on close. When I ctrl + C a debug instance, the data does not get saved. What if the user uses Task manager to close the app? What if the user's computer shuts down randomly? I suggest the following functionality:
onSet:
- Update data in queue and tell rust what to update
- On rust side, write in a fail safe way. That is
Rename `filename.dat` to `bak/filename.data.bak`
Write to `filename.dat`
- On first load, if `filename.dat` fails, try reading from `bak/filename.data.bak`
Contributor guide
Assessment
This issue has not been assessed yet.