Trait casserole::store::Store[][src]

pub trait Store {
    type Error;
    type Key: Serialize + DeserializeOwned;
    fn put<T>(&mut self, value: &T) -> Result<Self::Key, Self::Error>
    where
        T: Serialize
;
fn get<T>(&mut self, key: &Self::Key) -> Result<Option<T>, Self::Error>
    where
        T: DeserializeOwned
; }
Expand description

A Store is an abstraction for Casserole to put the translated values.

Associated Types

Error returned by the Store’s operation.

The keys used to fetch stored values.

Required methods

Save a value to the store and return a key.

Fetch a value from the store based on a key.

Implementors