pub struct ProviderRegistry { /* private fields */ }Expand description
Registry of available providers
Implementations§
Source§impl ProviderRegistry
impl ProviderRegistry
Sourcepub fn providers(&self) -> &[Box<dyn ChatProvider>]
pub fn providers(&self) -> &[Box<dyn ChatProvider>]
Get all registered providers
Sourcepub fn available_providers(&self) -> Vec<&dyn ChatProvider>
pub fn available_providers(&self) -> Vec<&dyn ChatProvider>
Get available (configured and working) providers
Sourcepub fn get_provider(
&self,
provider_type: ProviderType,
) -> Option<&dyn ChatProvider>
pub fn get_provider( &self, provider_type: ProviderType, ) -> Option<&dyn ChatProvider>
Get a provider by type
Sourcepub fn list_all_sessions(&self) -> Result<Vec<(ProviderType, ChatSession)>>
pub fn list_all_sessions(&self) -> Result<Vec<(ProviderType, ChatSession)>>
List all sessions from all providers
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 more