Struct cdrs::client::CDRS
[−]
[src]
pub struct CDRS<T: Authenticator, X: CDRSTransport> { /* fields omitted */ }
CDRS driver structure that provides a basic functionality to work with DB including establishing new connection, getting supported options, preparing and executing CQL queries, using compression and other.
Methods
impl<'a, T: Authenticator + 'a, X: CDRSTransport + 'a> CDRS<T, X>
[src]
fn new(transport: X, authenticator: T) -> CDRS<T, X>
The method creates new instance of CDRS driver. At this step an instance doesn't
connected to DB Server. To create new instance two parameters are needed to be
provided - addr
is IP address of DB Server, authenticator
is a selected authenticator
that is supported by particular DB Server. There are few authenticators already
provided by this trait.
fn get_options(&mut self) -> Result<CassandraOptions>
The method makes an Option request to DB Server. As a response the server returns a map of supported options.
fn start(self, compressor: Compression) -> Result<Session<T, X>>
The method establishes connection to the server which address was provided on previous
step. To create connection it's required to provide a compression method from a list
of supported ones. In 4-th version of Cassandra protocol lz4 (Compression::Lz4
)
and snappy (Compression::Snappy
) are supported. There is also one special compression
method provided by CRDR driver, it's Compression::None
that tells drivers that it
should work without compression. If compression is provided then incomming frames
will be decompressed automatically.
Trait Implementations
impl<T: Eq + Authenticator, X: Eq + CDRSTransport> Eq for CDRS<T, X>
[src]
impl<T: PartialEq + Authenticator, X: PartialEq + CDRSTransport> PartialEq for CDRS<T, X>
[src]
fn eq(&self, __arg_0: &CDRS<T, X>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &CDRS<T, X>) -> bool
This method tests for !=
.
impl<T: Ord + Authenticator, X: Ord + CDRSTransport> Ord for CDRS<T, X>
[src]
fn cmp(&self, __arg_0: &CDRS<T, X>) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
ord_max_min
)Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
ord_max_min
)Compares and returns the minimum of two values. Read more
impl<T: PartialOrd + Authenticator, X: PartialOrd + CDRSTransport> PartialOrd for CDRS<T, X>
[src]
fn partial_cmp(&self, __arg_0: &CDRS<T, X>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &CDRS<T, X>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &CDRS<T, X>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &CDRS<T, X>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &CDRS<T, X>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more