spoke/core/ets_storage
Provides ETS-backed session storage on the Erlang target.
Types
A handle to the ETS table storing the session state.
pub type EtsStorage
Values
pub fn load_from_file(
filename: String,
) -> Result(EtsStorage, EtsError)
Loads a session previously stored to a file using store_to_file
.
pub fn read(storage: EtsStorage) -> session_state.SessionState
Reads the currently stored session state.
pub fn store_to_file(
storage: EtsStorage,
filename: String,
) -> Result(Nil, EtsError)
Stores the ETS table to a file, using Erlang’s serialization.
pub fn update(
storage: EtsStorage,
what: session_state.StorageUpdate,
) -> Nil
Updates the state of the storage.