logo
pub trait StorageSystem {
    fn is_supported(&self) -> bool;
    fn set<A>(&self, key: String, value: A) -> bool
    where
        A: StorageItem
; fn get<A>(&self, key: String) -> Option<&A>
    where
        A: StorageItem
; fn remove(&mut self, key: String); fn clear(&mut self); }
Expand description

A simple key/value store that persists between sessions.

Required Methods

True if the environment supports persisted storage. Otherwise, the storage is backed by a Map and not actually persisted between sessions.

Add a key to the storage, replacing any existing value. @param value An object that can be serialized with Serializer. @returns True if the value was successfully serialized and persisted.

Retrieve a value from storage for a given key.

Deletes a key/value pair from storage.

Clears the entire storage contents.

Implementors