Struct quad_wasmnastics::storage::Location [−][src]
Expand description
Settings for where the data should be stored.
- On desktop, data is stored to
/path/to/datadir/{bin_name}/v{version}/{profile}.dat
. - On localstorage, data is stored under the key
"{bin_name}/v{version}/{profile}"
.
Fields
bin_name: String
The name of your binary crate, via env!("CARGO_PKG_NAME")
.
You probably don’t want to edit this, but you might if you want several of your games to talk to each other, for example. (Note this example probably won’t be portable on the web because localstorage only stores things to one origin. If you host all your games yourself on one domain it might be, but on itch.io for example it won’t be.)
version: String
The version of your binary crate, via env!("CARGO_PKG_VERSION")
.
You might want to edit this if your serialization format updates less often than your crate version.
profile: String
The profile name.
If you have multiple players, you definitely want to update this.
Is "default"
by default.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Location
impl UnwindSafe for Location
Blanket Implementations
Mutably borrows from an owned value. Read more