pub struct ConnectionManager { /* private fields */ }Expand description
Manages connections to remote databases
Implementations§
Source§impl ConnectionManager
impl ConnectionManager
Sourcepub async fn get_or_create_connection(
&self,
config: RemoteDatabaseConfig,
) -> Result<Arc<dyn DatabaseAdapter>>
pub async fn get_or_create_connection( &self, config: RemoteDatabaseConfig, ) -> Result<Arc<dyn DatabaseAdapter>>
Sourcepub fn close_connection(&self, connection_string: &str) -> Result<()>
pub fn close_connection(&self, connection_string: &str) -> Result<()>
Close a specific connection by connection string
Sourcepub fn connection_count(&self) -> Result<usize>
pub fn connection_count(&self) -> Result<usize>
Get number of cached connections
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConnectionManager
impl RefUnwindSafe for ConnectionManager
impl Send for ConnectionManager
impl Sync for ConnectionManager
impl Unpin for ConnectionManager
impl UnsafeUnpin for ConnectionManager
impl UnwindSafe for ConnectionManager
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