[−]Struct amitu_base::DIESEL_POOL
Methods from Deref<Target = Pool<ConnectionManager<PgConnection>>>
pub fn get(&self) -> Result<PooledConnection<M>, Error>
[src]
Retrieves a connection from the pool.
Waits for at most the configured connection timeout before returning an error.
pub fn get_timeout(
&self,
timeout: Duration
) -> Result<PooledConnection<M>, Error>
[src]
&self,
timeout: Duration
) -> Result<PooledConnection<M>, Error>
Retrieves a connection from the pool, waiting for at most timeout
The given timeout will be used instead of the configured connection timeout.
pub fn try_get(&self) -> Option<PooledConnection<M>>
[src]
Attempts to retrieve a connection from the pool if there is one available.
Returns None
if there are no idle connections available in the pool.
This method will not block waiting to establish a new connection.
pub fn state(&self) -> State
[src]
Returns information about the current state of the pool.
pub fn max_size(&self) -> u32
[src]
Returns the configured maximum pool size.
pub fn min_idle(&self) -> Option<u32>
[src]
Returns the configured mimimum idle connection count.
pub fn test_on_check_out(&self) -> bool
[src]
Returns if the pool is configured to test connections on check out.
pub fn max_lifetime(&self) -> Option<Duration>
[src]
Returns the configured maximum connection lifetime.
pub fn idle_timeout(&self) -> Option<Duration>
[src]
Returns the configured idle connection timeout.
pub fn connection_timeout(&self) -> Duration
[src]
Returns the configured connection timeout.
Trait Implementations
impl Deref for DIESEL_POOL
type Target = Pool<ConnectionManager<PgConnection>>
The resulting type after dereferencing.
fn deref(&self) -> &Pool<ConnectionManager<PgConnection>>
impl LazyStatic for DIESEL_POOL
fn initialize(lazy: &Self)
Auto Trait Implementations
impl Sync for DIESEL_POOL
impl Unpin for DIESEL_POOL
impl Send for DIESEL_POOL
impl UnwindSafe for DIESEL_POOL
impl RefUnwindSafe for DIESEL_POOL
Blanket Implementations
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> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> IntoSql for T
[src]
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
[src]
Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
[src]
&'a Self: AsExpression<T>,
impl<T> Any for T where
T: Any,
T: Any,