pub struct MEM_SQLITE_INS { /* private fields */ }Methods from Deref<Target = Pool<SqliteConnectionManager>>§
Sourcepub fn get(&self) -> Result<PooledConnection<M>, Error>
pub fn get(&self) -> Result<PooledConnection<M>, Error>
Retrieves a connection from the pool.
Waits for at most the configured connection timeout before returning an error.
Sourcepub fn get_timeout(
&self,
timeout: Duration,
) -> Result<PooledConnection<M>, Error>
pub fn get_timeout( &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.
Sourcepub fn try_get(&self) -> Option<PooledConnection<M>>
pub fn try_get(&self) -> Option<PooledConnection<M>>
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.
Sourcepub fn test_on_check_out(&self) -> bool
pub fn test_on_check_out(&self) -> bool
Returns if the pool is configured to test connections on check out.
Sourcepub fn max_lifetime(&self) -> Option<Duration>
pub fn max_lifetime(&self) -> Option<Duration>
Returns the configured maximum connection lifetime.
Sourcepub fn idle_timeout(&self) -> Option<Duration>
pub fn idle_timeout(&self) -> Option<Duration>
Returns the configured idle connection timeout.
Sourcepub fn connection_timeout(&self) -> Duration
pub fn connection_timeout(&self) -> Duration
Returns the configured connection timeout.
Trait Implementations§
Source§impl Deref for MEM_SQLITE_INS
impl Deref for MEM_SQLITE_INS
Source§type Target = Pool<SqliteConnectionManager>
type Target = Pool<SqliteConnectionManager>
The resulting type after dereferencing.
Source§fn deref(&self) -> &Pool<SqliteConnectionManager>
fn deref(&self) -> &Pool<SqliteConnectionManager>
Dereferences the value.
impl LazyStatic for MEM_SQLITE_INS
Auto Trait Implementations§
impl Freeze for MEM_SQLITE_INS
impl RefUnwindSafe for MEM_SQLITE_INS
impl Send for MEM_SQLITE_INS
impl Sync for MEM_SQLITE_INS
impl Unpin for MEM_SQLITE_INS
impl UnsafeUnpin for MEM_SQLITE_INS
impl UnwindSafe for MEM_SQLITE_INS
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