pub struct ProviderRegistry { /* private fields */ }Expand description
Registry for managing multiple providers
Implementations§
Source§impl ProviderRegistry
impl ProviderRegistry
Sourcepub fn register<T: 'static + Send + Sync>(&mut self, venue: Venue, provider: T)
pub fn register<T: 'static + Send + Sync>(&mut self, venue: Venue, provider: T)
Register a provider for a venue (simplified for now due to associated type constraints)
Sourcepub fn get(&self, venue: &Venue) -> Option<&(dyn Any + Send + Sync)>
pub fn get(&self, venue: &Venue) -> Option<&(dyn Any + Send + Sync)>
Get a provider for a venue (returns Any due to associated type constraints)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProviderRegistry
impl !RefUnwindSafe for ProviderRegistry
impl Send for ProviderRegistry
impl Sync for ProviderRegistry
impl Unpin for ProviderRegistry
impl !UnwindSafe for ProviderRegistry
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