pub struct ProviderRegistry { /* private fields */ }Implementations§
Source§impl ProviderRegistry
impl ProviderRegistry
pub fn new() -> ProviderRegistry
pub fn register<P>(&mut self, provider: P)where
P: ModelProvider + 'static,
pub fn get(&self, provider_id: ProviderId) -> Option<Arc<dyn ModelProvider>>
pub fn remove( &mut self, provider_id: ProviderId, ) -> Option<Arc<dyn ModelProvider>>
pub fn contains(&self, provider_id: ProviderId) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Default for ProviderRegistry
impl Default for ProviderRegistry
Source§fn default() -> ProviderRegistry
fn default() -> ProviderRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProviderRegistry
impl !RefUnwindSafe for ProviderRegistry
impl Send for ProviderRegistry
impl Sync for ProviderRegistry
impl Unpin for ProviderRegistry
impl UnsafeUnpin 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