pub struct DatabaseConfigBuilder<___State = __DatabaseConfigBuilderInitialState> { /* private fields */ }Expand description
Use builder syntax to set the required parameters and finish by calling the method Self::build().
Implementations§
Source§impl<__Url, __MaxConnections, __TimeoutSeconds, __EnableLogging> DatabaseConfigBuilder<(__Url, __MaxConnections, __TimeoutSeconds, __EnableLogging)>
impl<__Url, __MaxConnections, __TimeoutSeconds, __EnableLogging> DatabaseConfigBuilder<(__Url, __MaxConnections, __TimeoutSeconds, __EnableLogging)>
Sourcepub fn build(self) -> DatabaseConfig
pub fn build(self) -> DatabaseConfig
Finishes building and returns the requested object.
Sourcepub fn url(
self,
value: String,
) -> <Self as __DatabaseConfigBuilderSetMember>::Urlwhere
__Url: IsUnset,
pub fn url(
self,
value: String,
) -> <Self as __DatabaseConfigBuilderSetMember>::Urlwhere
__Url: IsUnset,
Database connection URL
Sourcepub fn maybe_max_connections(
self,
value: Option<u32>,
) -> <Self as __DatabaseConfigBuilderSetMember>::MaxConnectionswhere
__MaxConnections: IsUnset,
pub fn maybe_max_connections(
self,
value: Option<u32>,
) -> <Self as __DatabaseConfigBuilderSetMember>::MaxConnectionswhere
__MaxConnections: IsUnset,
Same as Self::max_connections, but accepts an Option as input. See that method’s documentation for more details.
Sourcepub fn max_connections(
self,
value: u32,
) -> <Self as __DatabaseConfigBuilderSetMember>::MaxConnectionswhere
__MaxConnections: IsUnset,
pub fn max_connections(
self,
value: u32,
) -> <Self as __DatabaseConfigBuilderSetMember>::MaxConnectionswhere
__MaxConnections: IsUnset,
Maximum number of connections in the pool
Sourcepub fn maybe_timeout_seconds(
self,
value: Option<u64>,
) -> <Self as __DatabaseConfigBuilderSetMember>::TimeoutSecondswhere
__TimeoutSeconds: IsUnset,
pub fn maybe_timeout_seconds(
self,
value: Option<u64>,
) -> <Self as __DatabaseConfigBuilderSetMember>::TimeoutSecondswhere
__TimeoutSeconds: IsUnset,
Same as Self::timeout_seconds, but accepts an Option as input. See that method’s documentation for more details.
Sourcepub fn timeout_seconds(
self,
value: u64,
) -> <Self as __DatabaseConfigBuilderSetMember>::TimeoutSecondswhere
__TimeoutSeconds: IsUnset,
pub fn timeout_seconds(
self,
value: u64,
) -> <Self as __DatabaseConfigBuilderSetMember>::TimeoutSecondswhere
__TimeoutSeconds: IsUnset,
Connection timeout in seconds
Sourcepub fn maybe_enable_logging(
self,
value: Option<bool>,
) -> <Self as __DatabaseConfigBuilderSetMember>::EnableLoggingwhere
__EnableLogging: IsUnset,
pub fn maybe_enable_logging(
self,
value: Option<bool>,
) -> <Self as __DatabaseConfigBuilderSetMember>::EnableLoggingwhere
__EnableLogging: IsUnset,
Same as Self::enable_logging, but accepts an Option as input. See that method’s documentation for more details.
Sourcepub fn enable_logging(
self,
value: bool,
) -> <Self as __DatabaseConfigBuilderSetMember>::EnableLoggingwhere
__EnableLogging: IsUnset,
pub fn enable_logging(
self,
value: bool,
) -> <Self as __DatabaseConfigBuilderSetMember>::EnableLoggingwhere
__EnableLogging: IsUnset,
Whether to enable SQL query logging
Auto Trait Implementations§
impl<___State> Freeze for DatabaseConfigBuilder<___State>where
PhantomData<(PhantomData<DatabaseConfig>, PhantomData<String>, PhantomData<u32>, PhantomData<u64>, PhantomData<bool>, PhantomData<___State>)>: Freeze,
___State: Freeze,
impl<___State> RefUnwindSafe for DatabaseConfigBuilder<___State>where
PhantomData<(PhantomData<DatabaseConfig>, PhantomData<String>, PhantomData<u32>, PhantomData<u64>, PhantomData<bool>, PhantomData<___State>)>: RefUnwindSafe,
___State: RefUnwindSafe,
impl<___State> Send for DatabaseConfigBuilder<___State>where
PhantomData<(PhantomData<DatabaseConfig>, PhantomData<String>, PhantomData<u32>, PhantomData<u64>, PhantomData<bool>, PhantomData<___State>)>: Send,
___State: Send,
impl<___State> Sync for DatabaseConfigBuilder<___State>where
PhantomData<(PhantomData<DatabaseConfig>, PhantomData<String>, PhantomData<u32>, PhantomData<u64>, PhantomData<bool>, PhantomData<___State>)>: Sync,
___State: Sync,
impl<___State> Unpin for DatabaseConfigBuilder<___State>where
PhantomData<(PhantomData<DatabaseConfig>, PhantomData<String>, PhantomData<u32>, PhantomData<u64>, PhantomData<bool>, PhantomData<___State>)>: Unpin,
___State: Unpin,
impl<___State> UnsafeUnpin for DatabaseConfigBuilder<___State>where
PhantomData<(PhantomData<DatabaseConfig>, PhantomData<String>, PhantomData<u32>, PhantomData<u64>, PhantomData<bool>, PhantomData<___State>)>: UnsafeUnpin,
___State: UnsafeUnpin,
impl<___State> UnwindSafe for DatabaseConfigBuilder<___State>where
PhantomData<(PhantomData<DatabaseConfig>, PhantomData<String>, PhantomData<u32>, PhantomData<u64>, PhantomData<bool>, PhantomData<___State>)>: UnwindSafe,
___State: UnwindSafe,
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