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
type Key: Serialize + DeserializeOwned
type Key: Serialize + DeserializeOwned
The keys used to fetch stored values.
Required methods
Save a value to the store and return a key.