pub struct SqlGlobalConfig {
pub max_connections: u32,
pub min_connections: u32,
pub idle_timeout_secs: u64,
pub max_lifetime_secs: u64,
}Expand description
Global configuration for SQL component.
This is a plain Rust struct (no serde) with defaults and builder methods. It holds pool configuration that can be applied as defaults to endpoints.
Fields§
§max_connections: u32§min_connections: u32§idle_timeout_secs: u64§max_lifetime_secs: u64Implementations§
Source§impl SqlGlobalConfig
impl SqlGlobalConfig
pub fn new() -> Self
pub fn with_max_connections(self, value: u32) -> Self
pub fn with_min_connections(self, value: u32) -> Self
pub fn with_idle_timeout_secs(self, value: u64) -> Self
pub fn with_max_lifetime_secs(self, value: u64) -> Self
Trait Implementations§
Source§impl Clone for SqlGlobalConfig
impl Clone for SqlGlobalConfig
Source§fn clone(&self) -> SqlGlobalConfig
fn clone(&self) -> SqlGlobalConfig
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 SqlGlobalConfig
impl Debug for SqlGlobalConfig
Source§impl Default for SqlGlobalConfig
impl Default for SqlGlobalConfig
Source§impl PartialEq for SqlGlobalConfig
impl PartialEq for SqlGlobalConfig
impl StructuralPartialEq for SqlGlobalConfig
Auto Trait Implementations§
impl Freeze for SqlGlobalConfig
impl RefUnwindSafe for SqlGlobalConfig
impl Send for SqlGlobalConfig
impl Sync for SqlGlobalConfig
impl Unpin for SqlGlobalConfig
impl UnsafeUnpin for SqlGlobalConfig
impl UnwindSafe for SqlGlobalConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more