pub struct Config { /* private fields */ }
Expand description
Configuration for server connection, including: strictness, notifications, query_timeout, transaction_timeout
Implementations§
Source§impl Config
impl Config
Sourcepub fn set_strict(self, strict: bool) -> Self
pub fn set_strict(self, strict: bool) -> Self
Set the strict value of the config to the supplied value
Sourcepub fn set_notifications(self, notifications: bool) -> Self
👎Deprecated since 1.1.0: Moved to Capabilities::with_live_query_notifications()
pub fn set_notifications(self, notifications: bool) -> Self
Capabilities::with_live_query_notifications()
Set the notifications value of the config to the supplied value
Sourcepub fn notifications(self) -> Self
👎Deprecated since 1.1.0: Moved to Capabilities::with_live_query_notifications()
pub fn notifications(self) -> Self
Capabilities::with_live_query_notifications()
Set the config to use notifications
Sourcepub fn query_timeout(self, timeout: impl Into<Option<Duration>>) -> Self
pub fn query_timeout(self, timeout: impl Into<Option<Duration>>) -> Self
Set the query timeout of the config
Sourcepub fn transaction_timeout(self, timeout: impl Into<Option<Duration>>) -> Self
pub fn transaction_timeout(self, timeout: impl Into<Option<Duration>>) -> Self
Set the transaction timeout of the config
Sourcepub fn rustls(self, config: ClientConfig) -> Self
Available on crate feature rustls
only.
pub fn rustls(self, config: ClientConfig) -> Self
rustls
only.Use Rustls to configure TLS connections
Sourcepub fn native_tls(self, config: TlsConnector) -> Self
Available on crate feature native-tls
only.
pub fn native_tls(self, config: TlsConnector) -> Self
native-tls
only.Use native TLS to configure TLS connections
Sourcepub fn tick_interval(self, interval: impl Into<Option<Duration>>) -> Self
pub fn tick_interval(self, interval: impl Into<Option<Duration>>) -> Self
Set the interval at which the database should run node maintenance tasks
Sourcepub fn capabilities(self, capabilities: Capabilities) -> Self
pub fn capabilities(self, capabilities: Capabilities) -> Self
Set the capabilities for the database
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl !RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl !UnwindSafe for Config
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> 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