pub struct Registry<T>(/* private fields */);Expand description
A registry of items that are keyed by a string identifier.
Implementations§
Source§impl<T: Clone> Registry<T>
impl<T: Clone> Registry<T>
pub fn empty() -> Self
Sourcepub fn find_many<'a>(
&self,
ids: impl IntoIterator<Item = &'a Id>,
) -> impl Iterator<Item = Option<impl Deref<Target = T>>>
pub fn find_many<'a>( &self, ids: impl IntoIterator<Item = &'a Id>, ) -> impl Iterator<Item = Option<impl Deref<Target = T>>>
Return the items with the given IDs.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Registry<T>
impl<T> !RefUnwindSafe for Registry<T>
impl<T> Send for Registry<T>
impl<T> Sync for Registry<T>
impl<T> Unpin for Registry<T>
impl<T> UnsafeUnpin for Registry<T>
impl<T> !UnwindSafe for Registry<T>
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