pub struct ProviderRegistry { /* private fields */ }Implementations§
Source§impl ProviderRegistry
impl ProviderRegistry
Sourcepub fn register<T>(&self, provider: T)where
T: Provider + 'static,
pub fn register<T>(&self, provider: T)where
T: Provider + 'static,
Registers a provider instance.
Providers are instances that have already been constructed and are ready to be injected into other components. Typical use cases include database connections, HTTP clients, or external service configurations that cannot be auto-constructed from the State.
Auto Trait Implementations§
impl !Freeze for ProviderRegistry
impl !RefUnwindSafe for ProviderRegistry
impl !UnwindSafe for ProviderRegistry
impl Send for ProviderRegistry
impl Sync for ProviderRegistry
impl Unpin for ProviderRegistry
impl UnsafeUnpin 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