pub struct ConnectionPool { /* private fields */ }Expand description
Traditional connection pool with multiple connections
Implementations§
Source§impl ConnectionPool
impl ConnectionPool
Sourcepub async fn new(
config: ConnectionConfig,
host: String,
port: u16,
max_size: usize,
) -> RedisResult<Self>
pub async fn new( config: ConnectionConfig, host: String, port: u16, max_size: usize, ) -> RedisResult<Self>
Create a new connection pool
Sourcepub async fn execute_command(
&self,
command: String,
args: Vec<RespValue>,
) -> RedisResult<RespValue>
pub async fn execute_command( &self, command: String, args: Vec<RespValue>, ) -> RedisResult<RespValue>
Execute a command using a connection from the pool
Auto Trait Implementations§
impl Freeze for ConnectionPool
impl !RefUnwindSafe for ConnectionPool
impl Send for ConnectionPool
impl Sync for ConnectionPool
impl Unpin for ConnectionPool
impl UnsafeUnpin for ConnectionPool
impl !UnwindSafe for ConnectionPool
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