pub struct Store { /* private fields */ }
Implementations§
Source§impl Store
impl Store
pub fn new() -> Self
Sourcepub fn store<Key, Value>(
&self,
key: Key,
value: Value,
) -> Result<(), StoreError>
pub fn store<Key, Value>( &self, key: Key, value: Value, ) -> Result<(), StoreError>
start managing an item
Sourcepub fn lock<Key, Value>(
&self,
key: Key,
) -> Result<Persistent<'_, Key, Value>, LockError>
pub fn lock<Key, Value>( &self, key: Key, ) -> Result<Persistent<'_, Key, Value>, LockError>
get a managed item from store
Sourcepub fn borrow<Key, Value>(
&self,
key: Key,
) -> Result<PersistentRef<Key, Value>, BorrowError>
pub fn borrow<Key, Value>( &self, key: Key, ) -> Result<PersistentRef<Key, Value>, BorrowError>
get a reference to a managed item from store
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Store
impl !RefUnwindSafe for Store
impl !Send for Store
impl !Sync for Store
impl Unpin for Store
impl !UnwindSafe for Store
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more