pub struct ConnectionManager { /* private fields */ }Expand description
Connection manager that handles topology detection and connection creation
Implementations§
Source§impl ConnectionManager
impl ConnectionManager
Sourcepub fn new(config: ConnectionConfig) -> Self
pub fn new(config: ConnectionConfig) -> Self
Create a new connection manager
Sourcepub async fn get_topology(&mut self) -> RedisResult<TopologyType>
pub async fn get_topology(&mut self) -> RedisResult<TopologyType>
Get or detect the topology type
Sourcepub async fn create_connection(
&self,
host: &str,
port: u16,
) -> RedisResult<RedisConnection>
pub async fn create_connection( &self, host: &str, port: u16, ) -> RedisResult<RedisConnection>
Create a new connection to the specified host and port
Sourcepub fn config(&self) -> &ConnectionConfig
pub fn config(&self) -> &ConnectionConfig
Get the configuration
Auto Trait Implementations§
impl Freeze for ConnectionManager
impl RefUnwindSafe for ConnectionManager
impl Send for ConnectionManager
impl Sync for ConnectionManager
impl Unpin 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