pub struct ClientPool { /* private fields */ }Expand description
Client pool for managing multiple clients
Implementations§
Source§impl ClientPool
impl ClientPool
Sourcepub fn add_client(&mut self, name: impl Into<String>, client: Client)
pub fn add_client(&mut self, name: impl Into<String>, client: Client)
Add a client to the pool
Sourcepub fn default_client(&self) -> Option<&Arc<Client>>
pub fn default_client(&self) -> Option<&Arc<Client>>
Get the default client
Sourcepub fn set_default(&mut self, name: impl Into<String>) -> RsllmResult<()>
pub fn set_default(&mut self, name: impl Into<String>) -> RsllmResult<()>
Set the default client
Sourcepub fn client_names(&self) -> Vec<&String>
pub fn client_names(&self) -> Vec<&String>
List all client names
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ClientPool
impl !UnwindSafe for ClientPool
impl Freeze for ClientPool
impl Send for ClientPool
impl Sync for ClientPool
impl Unpin for ClientPool
impl UnsafeUnpin for ClientPool
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