pub enum Pool {
Multiplexed(MultiplexedPool),
Pool(Box<ConnectionPool>),
}Expand description
Unified pool abstraction that can be either multiplexed or traditional pool
Variants§
Multiplexed(MultiplexedPool)
Multiplexed connection
Pool(Box<ConnectionPool>)
Traditional connection pool
Implementations§
Source§impl Pool
impl Pool
Sourcepub async fn new(
config: ConnectionConfig,
host: String,
port: u16,
) -> RedisResult<Self>
pub async fn new( config: ConnectionConfig, host: String, port: u16, ) -> RedisResult<Self>
Create a new pool based on the configuration
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 through the pool
Auto Trait Implementations§
impl Freeze for Pool
impl !RefUnwindSafe for Pool
impl Send for Pool
impl Sync for Pool
impl Unpin for Pool
impl UnsafeUnpin for Pool
impl !UnwindSafe for Pool
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