pub struct ProviderRegistry { /* private fields */ }Expand description
The provider registry - a thread-safe registry of all available providers
Implementations§
Source§impl ProviderRegistry
impl ProviderRegistry
Sourcepub fn register(&self, builder: Box<dyn ProviderBuilder>) -> Result<()>
pub fn register(&self, builder: Box<dyn ProviderBuilder>) -> Result<()>
Register a provider builder
Sourcepub fn get(&self, provider: &str) -> Option<ProviderEntry>
pub fn get(&self, provider: &str) -> Option<ProviderEntry>
Get a provider entry by name or alias
Sourcepub fn all(&self) -> Option<Vec<ProviderEntry>>
pub fn all(&self) -> Option<Vec<ProviderEntry>>
Get all registered providers
Sourcepub fn by_category(
&self,
category: ProviderCategory,
) -> Option<Vec<ProviderEntry>>
pub fn by_category( &self, category: ProviderCategory, ) -> Option<Vec<ProviderEntry>>
Get providers by category
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.