pub struct DataStoreRegistry(/* private fields */);Expand description
DataStoreRegistry
Implementations§
Methods from Deref<Target = StoreRegistry<DataStore>>§
pub fn iter( &self, ) -> impl Iterator<Item = (&'static str, &'static LocalKey<RefCell<T>>)>
pub fn for_each<R>(&self, f: impl FnMut(&'static str, &T) -> R)
pub fn register( &mut self, name: &'static str, accessor: &'static LocalKey<RefCell<T>>, )
pub fn try_get_store( &self, path: &str, ) -> Result<&'static LocalKey<RefCell<T>>, Error>
pub fn with_store<R>( &self, path: &str, f: impl FnOnce(&T) -> R, ) -> Result<R, Error>
pub fn with_store_mut<R>( &self, path: &str, f: impl FnOnce(&mut T) -> R, ) -> Result<R, Error>
Trait Implementations§
Source§impl Deref for DataStoreRegistry
impl Deref for DataStoreRegistry
Auto Trait Implementations§
impl Freeze for DataStoreRegistry
impl RefUnwindSafe for DataStoreRegistry
impl Send for DataStoreRegistry
impl Sync for DataStoreRegistry
impl Unpin for DataStoreRegistry
impl UnwindSafe for DataStoreRegistry
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