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_ast_payload(self, ast_payload: bool) -> Self
pub fn set_ast_payload(self, ast_payload: bool) -> Self
Whether to send queries as AST
Sourcepub fn ast_payload(self) -> Self
pub fn ast_payload(self) -> Self
Send queries as AST
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
WARNING: rustls
is not stable yet. As we may need to upgrade this dependency from time to time
to keep up with its security fixes, this method is excluded from our stability guarantee.
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
WARNING: native-tls
is not stable yet. As we may need to upgrade this dependency from time to time
to keep up with its security fixes, this method is excluded from our stability guarantee.
Sourcepub fn capabilities(self, capabilities: Capabilities) -> Self
pub fn capabilities(self, capabilities: Capabilities) -> Self
Set the capabilities for the database
pub fn temporary_directory(self, path: Option<PathBuf>) -> Self
Sourcepub fn node_membership_refresh_interval(
self,
interval: impl Into<Option<Duration>>,
) -> Self
pub fn node_membership_refresh_interval( self, interval: impl Into<Option<Duration>>, ) -> Self
Set the interval at which the database should run node maintenance tasks
Sourcepub fn node_membership_check_interval(
self,
interval: impl Into<Option<Duration>>,
) -> Self
pub fn node_membership_check_interval( self, interval: impl Into<Option<Duration>>, ) -> Self
Set the interval at which the database should run node maintenance tasks
Sourcepub fn node_membership_cleanup_interval(
self,
interval: impl Into<Option<Duration>>,
) -> Self
pub fn node_membership_cleanup_interval( self, interval: impl Into<Option<Duration>>, ) -> Self
Set the interval at which the database should run node maintenance tasks
Sourcepub fn changefeed_gc_interval(
self,
interval: impl Into<Option<Duration>>,
) -> Self
pub fn changefeed_gc_interval( self, interval: impl Into<Option<Duration>>, ) -> Self
Set the interval at which the database should run node maintenance tasks
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
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>
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>
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