pub struct Options {
pub idle_timeout: Duration,
pub connect_timeout: Duration,
pub max_connections: usize,
pub on_connected: Option<OnConnected>,
}
Expand description
Configuration options for the connection pool
Fields§
§idle_timeout: Duration
How long to keep idle connections around.
connect_timeout: Duration
Timeout for connect. This includes the time spent in on_connect, if set.
max_connections: usize
Maximum number of connections to hand out.
on_connected: Option<OnConnected>
An optional callback that can be used to wait for the connection to enter some state. An example usage could be to wait for the connection to become direct before handing it out to the user.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Options
impl !RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl !UnwindSafe for Options
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