Storable

Trait Storable 

Source
pub trait Storable: Serialize + for<'a> Deserialize<'a> {
    // Provided methods
    fn key() -> &'static str { ... }
    fn area() -> Area { ... }
}
Expand description

Allows state to be stored persistently in local or session storage.

Provided Methods§

Source

fn key() -> &'static str

The key used to save and load state from storage.

Source

fn area() -> Area

The area to store state.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: Storable> Storable for Option<T>

Source§

fn key() -> &'static str

Source§

fn area() -> Area

Source§

impl<T: Storable> Storable for Rc<T>

Source§

fn key() -> &'static str

Source§

fn area() -> Area

Implementors§