Struct skytable::ConnectionBuilder
source · [−]pub struct ConnectionBuilder { /* private fields */ }
Expand description
A connection builder for easily building connections
Example (sync)
use skytable::ConnectionBuilder;
let con =
ConnectionBuilder::new()
.set_host("127.0.0.1".to_string())
.set_port(2003)
.set_entity("mykeyspace:mytable".to_string())
.get_connection()
.unwrap();
Example (async)
use skytable::ConnectionBuilder;
async fn run() {
let con =
ConnectionBuilder::new()
.set_host("127.0.0.1".to_string())
.set_port(2003)
.set_entity("mykeyspace:mytable".to_string())
.get_async_connection()
.await
.unwrap();
}
Implementations
Set the entity (defaults to default:default
)
This is supported on crate feature sync
only.
This is supported on crate feature
sync
only.Get a sync connection to the database
This is supported on crate feature sync
and (crate features ssl
or sslv
) only.
This is supported on crate feature
sync
and (crate features ssl
or sslv
) only.Get a sync TLS connection to the database
This is supported on crate feature aio
only.
This is supported on crate feature
aio
only.Get an async connection to the database
This is supported on crate feature aio
and (crate features aio-ssl
or aio-sslv
) only.
This is supported on crate feature
aio
and (crate features aio-ssl
or aio-sslv
) only.Get an async TLS connection to the database
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ConnectionBuilder
impl Send for ConnectionBuilder
impl Sync for ConnectionBuilder
impl Unpin for ConnectionBuilder
impl UnwindSafe for ConnectionBuilder
Blanket Implementations
Mutably borrows from an owned value. Read more