pub struct IndexStoreRegistry(/* private fields */);Expand description
IndexStoreRegistry
Implementations§
Methods from Deref<Target = StoreRegistry<IndexStore>>§
Sourcepub fn iter(
&self,
) -> impl Iterator<Item = (&'static str, &'static LocalKey<RefCell<T>>)>
pub fn iter( &self, ) -> impl Iterator<Item = (&'static str, &'static LocalKey<RefCell<T>>)>
Iterate registered store names and thread-local keys.
Sourcepub fn for_each<R>(&self, f: impl FnMut(&'static str, &T) -> R)
pub fn for_each<R>(&self, f: impl FnMut(&'static str, &T) -> R)
Borrow each registered store immutably.
Sourcepub fn register(
&mut self,
name: &'static str,
accessor: &'static LocalKey<RefCell<T>>,
)
pub fn register( &mut self, name: &'static str, accessor: &'static LocalKey<RefCell<T>>, )
Register a thread-local store accessor under a path.
Sourcepub fn try_get_store(
&self,
path: &str,
) -> Result<&'static LocalKey<RefCell<T>>, Error>
pub fn try_get_store( &self, path: &str, ) -> Result<&'static LocalKey<RefCell<T>>, Error>
Look up a store accessor by path.
Trait Implementations§
Source§impl Deref for IndexStoreRegistry
impl Deref for IndexStoreRegistry
Source§type Target = StoreRegistry<IndexStore>
type Target = StoreRegistry<IndexStore>
The resulting type after dereferencing.
Auto Trait Implementations§
impl Freeze for IndexStoreRegistry
impl RefUnwindSafe for IndexStoreRegistry
impl Send for IndexStoreRegistry
impl Sync for IndexStoreRegistry
impl Unpin for IndexStoreRegistry
impl UnwindSafe for IndexStoreRegistry
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