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 new() -> ScyllaDBConnectOptions
pub fn new() -> ScyllaDBConnectOptions
Create a default set of connection options.
Sourcepub fn host(self, host: &str) -> ScyllaDBConnectOptions
pub fn host(self, host: &str) -> ScyllaDBConnectOptions
Set the host of primary node to connect to.
Sourcepub fn port(self, port: u16) -> ScyllaDBConnectOptions
pub fn port(self, port: u16) -> ScyllaDBConnectOptions
Set the port of primary node to connect to.
Sourcepub fn add_node(self, node: impl Into<String>) -> ScyllaDBConnectOptions
pub fn add_node(self, node: impl Into<String>) -> ScyllaDBConnectOptions
Add the node to connect to.
Sourcepub fn keyspace(self, keyspace: impl Into<String>) -> ScyllaDBConnectOptions
pub fn keyspace(self, keyspace: impl Into<String>) -> ScyllaDBConnectOptions
Set the keyspace to use.
Sourcepub fn username(self, username: &str) -> ScyllaDBConnectOptions
pub fn username(self, username: &str) -> ScyllaDBConnectOptions
Set the username for authentication.
Sourcepub fn password(self, password: &str) -> ScyllaDBConnectOptions
pub fn password(self, password: &str) -> ScyllaDBConnectOptions
Set the password for authentication.
Sourcepub fn replication_strategy(
self,
strategy: ScyllaDBReplicationStrategy,
) -> ScyllaDBConnectOptions
pub fn replication_strategy( self, strategy: ScyllaDBReplicationStrategy, ) -> ScyllaDBConnectOptions
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) -> ScyllaDBConnectOptions
pub fn replication_factor(self, factor: usize) -> ScyllaDBConnectOptions
Set the replication factor. This value is only used during keytable creation and is not normally required to be set.
Sourcepub fn compresson(
self,
compression: ScyllaDBCompression,
) -> ScyllaDBConnectOptions
pub fn compresson( self, compression: ScyllaDBCompression, ) -> ScyllaDBConnectOptions
Set the compression method used during communication.
Sourcepub fn tls_rootcert(self, root_cert: &str) -> ScyllaDBConnectOptions
pub fn tls_rootcert(self, root_cert: &str) -> ScyllaDBConnectOptions
Set the path to the RootCA certificate when using TLS.
Sourcepub fn tls_cert(self, cert: &str) -> ScyllaDBConnectOptions
pub fn tls_cert(self, cert: &str) -> ScyllaDBConnectOptions
Set the path to the client certificate when using TLS.
Sourcepub fn tls_key(self, key: &str) -> ScyllaDBConnectOptions
pub fn tls_key(self, key: &str) -> ScyllaDBConnectOptions
Set the path to the client private key when using TLS.
Sourcepub fn tcp_nodelay(self) -> ScyllaDBConnectOptions
pub fn tcp_nodelay(self) -> ScyllaDBConnectOptions
Enable tcp_nodelay.
Sourcepub fn tcp_keepalive(self, secs: u64) -> ScyllaDBConnectOptions
pub fn tcp_keepalive(self, secs: u64) -> ScyllaDBConnectOptions
Set the interval for TCP keepalive.
Sourcepub fn page_size(self, page_size: i32) -> ScyllaDBConnectOptions
pub fn page_size(self, page_size: i32) -> ScyllaDBConnectOptions
Sets the size per page for data retrieval pagination.
Trait Implementations§
Source§impl Clone for ScyllaDBConnectOptions
impl Clone for ScyllaDBConnectOptions
Source§fn clone(&self) -> ScyllaDBConnectOptions
fn clone(&self) -> ScyllaDBConnectOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl ConnectOptions for ScyllaDBConnectOptions
impl ConnectOptions for ScyllaDBConnectOptions
type Connection = ScyllaDBConnection
Source§fn from_url(url: &Url) -> Result<ScyllaDBConnectOptions, Error>
fn from_url(url: &Url) -> Result<ScyllaDBConnectOptions, Error>
ConnectOptions
from a URL.Source§fn to_url_lossy(&self) -> Url
fn to_url_lossy(&self) -> Url
ConnectOptions
. Read moreSource§fn connect(
&self,
) -> Pin<Box<dyn Future<Output = Result<<ScyllaDBConnectOptions as ConnectOptions>::Connection, Error>> + Send + '_>>
fn connect( &self, ) -> Pin<Box<dyn Future<Output = Result<<ScyllaDBConnectOptions as ConnectOptions>::Connection, Error>> + Send + '_>>
self
.Source§fn log_statements(self, level: LevelFilter) -> ScyllaDBConnectOptions
fn log_statements(self, level: LevelFilter) -> ScyllaDBConnectOptions
level
Source§fn log_slow_statements(
self,
level: LevelFilter,
duration: Duration,
) -> ScyllaDBConnectOptions
fn log_slow_statements( self, level: LevelFilter, duration: Duration, ) -> ScyllaDBConnectOptions
duration
at the specified level
.Source§fn disable_statement_logging(self) -> Self
fn disable_statement_logging(self) -> Self
Source§impl Debug for ScyllaDBConnectOptions
impl Debug for ScyllaDBConnectOptions
Source§impl FromStr for ScyllaDBConnectOptions
impl FromStr for ScyllaDBConnectOptions
Source§impl<'a> TryFrom<&'a AnyConnectOptions> for ScyllaDBConnectOptions
impl<'a> TryFrom<&'a AnyConnectOptions> for ScyllaDBConnectOptions
Source§fn try_from(
any_opts: &'a AnyConnectOptions,
) -> Result<ScyllaDBConnectOptions, <ScyllaDBConnectOptions as TryFrom<&'a AnyConnectOptions>>::Error>
fn try_from( any_opts: &'a AnyConnectOptions, ) -> Result<ScyllaDBConnectOptions, <ScyllaDBConnectOptions as TryFrom<&'a AnyConnectOptions>>::Error>
Source§impl TryInto<TlsContext> for &ScyllaDBConnectOptions
impl TryInto<TlsContext> for &ScyllaDBConnectOptions
Source§fn try_into(
self,
) -> Result<TlsContext, <&ScyllaDBConnectOptions as TryInto<TlsContext>>::Error>
fn try_into( self, ) -> Result<TlsContext, <&ScyllaDBConnectOptions as TryInto<TlsContext>>::Error>
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
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