[−][src]Struct darkredis::ConnectionPool
A connection pool. Clones are cheap and is the expected way to send the pool around your application.
Methods
impl ConnectionPool
[src]
pub async fn create<'_>(
address: String,
password: Option<&'_ str>,
connection_count: usize
) -> Result<Self>
[src]
address: String,
password: Option<&'_ str>,
connection_count: usize
) -> Result<Self>
Create a new connection pool for address
, with connection_count
connections. All connections
are created in this function, and depending on the amount of connections desired, can therefore
take some time to complete.
pub async fn get<'_>(&'_ self) -> MutexGuard<'_, Connection>
[src]
Get an available connection from the pool, or wait for one to become available if none are available.
Trait Implementations
impl Clone for ConnectionPool
[src]
fn clone(&self) -> ConnectionPool
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Sync for ConnectionPool
impl Send for ConnectionPool
impl Unpin for ConnectionPool
impl !RefUnwindSafe for ConnectionPool
impl !UnwindSafe for ConnectionPool
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,