pub struct FastPool {
    pub manager: ConnManagerProxy,
    pub inner: Pool<ConnManagerProxy>,
    pub timeout: AtomicDuration,
}

Fields§

§manager: ConnManagerProxy§inner: Pool<ConnManagerProxy>§timeout: AtomicDuration

Trait Implementations§

source§

impl Debug for FastPool

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Pool for FastPool

source§

fn new(manager: ConnManager) -> Result<Self, Error>
where Self: Sized,

create an Pool,use ConnManager
source§

fn get<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Connection>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

get an connection from pool
source§

fn get_timeout<'life0, 'async_trait>( &'life0 self, d: Duration ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Connection>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

get timeout from pool
source§

fn set_timeout<'life0, 'async_trait>( &'life0 self, timeout: Option<Duration> ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn set_conn_max_lifetime<'life0, 'async_trait>( &'life0 self, _max_lifetime: Option<Duration> ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn set_max_idle_conns<'life0, 'async_trait>( &'life0 self, _n: u64 ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn set_max_open_conns<'life0, 'async_trait>( &'life0 self, n: u64 ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn driver_type(&self) -> &str

get driver_type from manager: ConnManager
source§

fn state<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Value> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

return state

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.