pub enum Timeout {
Unset,
Infinite,
Of(f64),
}Expand description
The per-call acquire timeout. One of three things:
Timeout::Unset— use the pool’s configuredacquire_timeoutdefault.Timeout::Infinite— wait forever.Timeout::Of— wait that many seconds (0.0= don’t wait).
Variants§
Unset
Use the configured default (config.acquire_timeout).
Infinite
Wait forever.
Of(f64)
Wait this many seconds (0.0 = don’t wait).
Implementations§
Source§impl Timeout
impl Timeout
Sourcepub fn from_option(seconds: Option<f64>) -> Self
pub fn from_option(seconds: Option<f64>) -> Self
Maps None -> Timeout::Infinite and Some(s) -> Timeout::Of.
Trait Implementations§
impl Copy for Timeout
impl StructuralPartialEq for Timeout
Auto Trait Implementations§
impl Freeze for Timeout
impl RefUnwindSafe for Timeout
impl Send for Timeout
impl Sync for Timeout
impl Unpin for Timeout
impl UnsafeUnpin for Timeout
impl UnwindSafe for Timeout
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