Struct typedb_driver::Connection
source · pub struct Connection { /* private fields */ }
Implementations§
source§impl Connection
impl Connection
sourcepub fn new_cloud<T: AsRef<str> + Sync>(
init_addresses: &[T],
credential: Credential
) -> Result<Self>
pub fn new_cloud<T: AsRef<str> + Sync>( init_addresses: &[T], credential: Credential ) -> Result<Self>
Creates a new TypeDB Cloud connection.
§Arguments
init_addresses
– Addresses (host:port) on which TypeDB Cloud nodes are runningcredential
– User credential and TLS encryption setting
§Examples
Connection::new_cloud(
&["localhost:11729", "localhost:21729", "localhost:31729"],
Credential::with_tls(
"admin",
"password",
Some(&PathBuf::from(
std::env::var("ROOT_CA")
.expect("ROOT_CA environment variable needs to be set for cloud tests to run"),
)),
)?,
)
sourcepub fn force_close(&self) -> Result
pub fn force_close(&self) -> Result
Trait Implementations§
source§impl Clone for Connection
impl Clone for Connection
source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
Returns a copy 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 moreAuto Trait Implementations§
impl !RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl !UnwindSafe for Connection
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request