Module cdrs::transport
[−]
[src]
This module contains a declaration of CDRSTransport
trait which should be implemented
for particular transport in order to be able using it as a trasport of CDRS client.
Curently CDRS provides to concrete transports which implement CDRSTranpsport
trait. There
are:
TransportTcp
is default TCP transport which is usually used to establish connection and exchange frames.TransportTls
is a transport which is used to establish SSL encrypted connection with Apache Cassandra server. Note: this option is available if and only if CDRS is imported withssl
feature.Examples
use cdrs::transport::TransportTcp; use cdrs::authenticators::NoneAuthenticator; use cdrs::client::CDRS; let addr = "127.0.0.1:9042"; let tcp_transport = TransportTcp::new(addr).unwrap(); // pass authenticator into CDRS' constructor let client = CDRS::new(tcp_transport, NoneAuthenticator);
Structs
TransportTcp |
Default Tcp transport. |
Traits
CDRSTransport |
General CDRS transport trait. Both |