pub struct DatabaseConfigBuilder { /* private fields */ }Expand description
Builder for DatabaseConfig
Implementations§
Source§impl DatabaseConfigBuilder
impl DatabaseConfigBuilder
Sourcepub fn max_connections(self, count: u32) -> Self
pub fn max_connections(self, count: u32) -> Self
Set maximum pool connections
Sourcepub fn min_connections(self, count: u32) -> Self
pub fn min_connections(self, count: u32) -> Self
Set minimum pool connections
Sourcepub fn connect_timeout(self, seconds: u64) -> Self
pub fn connect_timeout(self, seconds: u64) -> Self
Set connection timeout in seconds
Sourcepub fn build(self) -> DatabaseConfig
pub fn build(self) -> DatabaseConfig
Build the configuration
Trait Implementations§
Source§impl Debug for DatabaseConfigBuilder
impl Debug for DatabaseConfigBuilder
Source§impl Default for DatabaseConfigBuilder
impl Default for DatabaseConfigBuilder
Source§fn default() -> DatabaseConfigBuilder
fn default() -> DatabaseConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DatabaseConfigBuilder
impl RefUnwindSafe for DatabaseConfigBuilder
impl Send for DatabaseConfigBuilder
impl Sync for DatabaseConfigBuilder
impl Unpin for DatabaseConfigBuilder
impl UnsafeUnpin for DatabaseConfigBuilder
impl UnwindSafe for DatabaseConfigBuilder
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> 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