pub struct Registry<T> { /* private fields */ }
Available on crate feature
registry
only.Expand description
A struct that manages a collection of registry entries.
Implementations§
Source§impl<T> Registry<T>
impl<T> Registry<T>
Sourcepub fn entry<E>(self, entry: E) -> Self
pub fn entry<E>(self, entry: E) -> Self
Adds a RegistryEntry
to the registry.
Sourcepub async fn find_match<I>(&mut self, input: I) -> Option<T>
pub async fn find_match<I>(&mut self, input: I) -> Option<T>
Checks the given input against the registry and returns the first matching value, if found.
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> !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