Hi,
I'm trying to implement a persistent storage for app data and I've found tauri-plugin-store.
To share data storage between JS and Rust there's a shared 'store' which on the rust side is accessible with the function with_store().
I can't figure out how to retrieve and use a value from the store.
Right now, I'm trying something like what is attached as a screenshot.
The output of dbg!() is
[src/main.rs:235] k = ""23""
but I want just the value '23'
I have two questions
- My process of getting the value from the store feels wrong in some way. I can't find any documentation on how to use get() inside with_store() and my solution with and_then() including Some() and ok_or() just feels wrong.
- Even if my solution to extract a value of some key is appropriate, how do I convert it to just '23'?