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 Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more