pub struct ScyllaDBConnectOptions { /* private fields */ }
Expand description
Options and flags which can be used to configure a ScyllaDB connection.
Implementations§
Source§impl ScyllaDBConnectOptions
impl ScyllaDBConnectOptions
Sourcepub fn user_authentication(
self,
username: impl Into<String>,
password: impl Into<String>,
) -> Self
pub fn user_authentication( self, username: impl Into<String>, password: impl Into<String>, ) -> Self
Set the authentication information when performing authentication.
Sourcepub fn replication_strategy(self, strategy: ScyllaDBReplicationStrategy) -> Self
pub fn replication_strategy(self, strategy: ScyllaDBReplicationStrategy) -> Self
Set the replication strategy. This value is only used during keyspace creation and is not normally required to be set.
Sourcepub fn replication_factor(self, factor: usize) -> Self
pub fn replication_factor(self, factor: usize) -> Self
Set the replication factor. This value is only used during keytable creation and is not normally required to be set.
Sourcepub fn compressor(self, compressor: ScyllaDBCompressor) -> Self
pub fn compressor(self, compressor: ScyllaDBCompressor) -> Self
Set the compression method used during communication.
Sourcepub fn tls_rootcert(self, root_cert: impl Into<String>) -> Self
pub fn tls_rootcert(self, root_cert: impl Into<String>) -> Self
Set the path to the RootCA certificate when using TLS.
Sourcepub fn tls_cert(self, cert: impl Into<String>) -> Self
pub fn tls_cert(self, cert: impl Into<String>) -> Self
Set the path to the client certificate when using TLS.
Sourcepub fn tls_key(self, key: impl Into<String>) -> Self
pub fn tls_key(self, key: impl Into<String>) -> Self
Set the path to the client private key when using TLS.
Sourcepub fn tcp_nodelay(self) -> Self
pub fn tcp_nodelay(self) -> Self
Enable tcp_nodelay.
Sourcepub fn tcp_keepalive(self, secs: u64) -> Self
pub fn tcp_keepalive(self, secs: u64) -> Self
Set the interval for TCP keepalive.
Trait Implementations§
Source§impl Clone for ScyllaDBConnectOptions
impl Clone for ScyllaDBConnectOptions
Source§fn clone(&self) -> ScyllaDBConnectOptions
fn clone(&self) -> ScyllaDBConnectOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl ConnectOptions for ScyllaDBConnectOptions
impl ConnectOptions for ScyllaDBConnectOptions
type Connection = ScyllaDBConnection
Source§fn connect(&self) -> BoxFuture<'_, Result<Self::Connection, Error>>where
Self::Connection: Sized,
fn connect(&self) -> BoxFuture<'_, Result<Self::Connection, Error>>where
Self::Connection: Sized,
Establish a new database connection with the options specified by
self
.Source§fn log_statements(self, level: LevelFilter) -> Self
fn log_statements(self, level: LevelFilter) -> Self
Log executed statements with the specified
level
Source§fn log_slow_statements(self, level: LevelFilter, duration: Duration) -> Self
fn log_slow_statements(self, level: LevelFilter, duration: Duration) -> Self
Log executed statements with a duration above the specified
duration
at the specified level
.Source§fn to_url_lossy(&self) -> Url
fn to_url_lossy(&self) -> Url
Get a connection URL that may be used to connect to the same database as this
ConnectOptions
. Read moreSource§fn disable_statement_logging(self) -> Self
fn disable_statement_logging(self) -> Self
Entirely disables statement logging (both slow and regular).
Source§impl Debug for ScyllaDBConnectOptions
impl Debug for ScyllaDBConnectOptions
Auto Trait Implementations§
impl Freeze for ScyllaDBConnectOptions
impl RefUnwindSafe for ScyllaDBConnectOptions
impl Send for ScyllaDBConnectOptions
impl Sync for ScyllaDBConnectOptions
impl Unpin for ScyllaDBConnectOptions
impl UnwindSafe for ScyllaDBConnectOptions
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