pub struct ConnectionManagerBuilder { /* private fields */ }Expand description
Builder for connection manager
Implementations§
Source§impl ConnectionManagerBuilder
impl ConnectionManagerBuilder
Sourcepub fn database_url(self, url: impl Into<String>) -> Self
pub fn database_url(self, url: impl Into<String>) -> Self
Set database URL
Sourcepub fn max_connections(self, max: u32) -> Self
pub fn max_connections(self, max: u32) -> Self
Set maximum connections
Sourcepub fn min_connections(self, min: u32) -> Self
pub fn min_connections(self, min: u32) -> Self
Set minimum connections
Sourcepub fn transaction_timeout(self, timeout: Duration) -> Self
pub fn transaction_timeout(self, timeout: Duration) -> Self
Set transaction timeout
Sourcepub fn isolation_level(self, level: IsolationLevel) -> Self
pub fn isolation_level(self, level: IsolationLevel) -> Self
Set isolation level
Sourcepub fn enable_query_monitoring(self, enable: bool) -> Self
pub fn enable_query_monitoring(self, enable: bool) -> Self
Enable query monitoring
Sourcepub async fn build(self) -> Result<ConnectionManager>
pub async fn build(self) -> Result<ConnectionManager>
Build the connection manager
Trait Implementations§
Source§impl Debug for ConnectionManagerBuilder
impl Debug for ConnectionManagerBuilder
Auto Trait Implementations§
impl Freeze for ConnectionManagerBuilder
impl RefUnwindSafe for ConnectionManagerBuilder
impl Send for ConnectionManagerBuilder
impl Sync for ConnectionManagerBuilder
impl Unpin for ConnectionManagerBuilder
impl UnsafeUnpin for ConnectionManagerBuilder
impl UnwindSafe for ConnectionManagerBuilder
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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