pub struct SdkStorage<S> { /* private fields */ }Expand description
A Storage of one file per key in the game’s data folder.
Implementations§
Trait Implementations§
Source§impl<S: Debug> Debug for SdkStorage<S>
impl<S: Debug> Debug for SdkStorage<S>
Source§impl<S: Sdk> Storage for SdkStorage<S>
impl<S: Sdk> Storage for SdkStorage<S>
Source§fn read(&self, key: &str) -> Result<Option<String>, StorageError>
fn read(&self, key: &str) -> Result<Option<String>, StorageError>
The value stored at
key, or None if nothing has been written
there (or it was deleted).Source§fn write(&mut self, key: &str, value: &str) -> Result<(), StorageError>
fn write(&mut self, key: &str, value: &str) -> Result<(), StorageError>
Stores
value at key, replacing whatever was there.Auto Trait Implementations§
impl<S> Freeze for SdkStorage<S>where
S: Freeze,
impl<S> RefUnwindSafe for SdkStorage<S>where
S: RefUnwindSafe,
impl<S> Send for SdkStorage<S>where
S: Send,
impl<S> Sync for SdkStorage<S>where
S: Sync,
impl<S> Unpin for SdkStorage<S>where
S: Unpin,
impl<S> UnsafeUnpin for SdkStorage<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for SdkStorage<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more