#[non_exhaustive]pub struct ConnectContext {
pub query_log: QueryLogConfig,
}Expand description
Per-connection configuration passed to Driver::connect.
The connection pool builds one from the values set on Db::builder() and
hands it to the driver every time a new connection is created, so drivers
can apply configuration at construction time rather than through separate
setters. Callers connecting outside a pool use
ConnectContext::default().
The struct is non-exhaustive: construct it with default() and assign the
fields to override.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.query_log: QueryLogConfigConfiguration for the per-query toasty::query tracing event (see
log). Drivers that emit the event store this on the connection
and consult it on every operation.
Trait Implementations§
Source§impl Clone for ConnectContext
impl Clone for ConnectContext
Source§fn clone(&self) -> ConnectContext
fn clone(&self) -> ConnectContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConnectContext
impl Debug for ConnectContext
Source§impl Default for ConnectContext
impl Default for ConnectContext
Source§fn default() -> ConnectContext
fn default() -> ConnectContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConnectContext
impl RefUnwindSafe for ConnectContext
impl Send for ConnectContext
impl Sync for ConnectContext
impl Unpin for ConnectContext
impl UnsafeUnpin for ConnectContext
impl UnwindSafe for ConnectContext
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