[][src]Struct hdbconnect::ConnectParams

pub struct ConnectParams { /* fields omitted */ }

An immutable struct with all information necessary to open a new connection to a HANA database.

Instantiating a ConnectParams using the ConnectParamsBuilder

See ConnectParamsBuilder for details.

use hdbconnect::{ConnectParams, ServerCerts};
let certificate: String = read_certificate();
let connect_params = ConnectParams::builder()
   .hostname("the_host")
   .port(2222)
   .dbuser("my_user")
   .password("my_passwd")
   .tls_with(ServerCerts::Direct(certificate))
   .build()
   .unwrap();

Instantiating a ConnectParams from a URL

See module url for details about the supported URLs.

use hdbconnect::IntoConnectParams;
let conn_params = "hdbsql://my_user:my_passwd@the_host:2222"
    .into_connect_params()
    .unwrap();

Implementations

impl ConnectParams[src]

pub fn builder() -> ConnectParamsBuilder[src]

Returns a new builder for ConnectParams.

pub fn from_file<P: AsRef<Path>>(path: P) -> HdbResult<Self>[src]

Reads a url from the given file and converts it into ConnectParams.

Errors

HdbError::ConnParams

pub fn server_certs(&self) -> &Vec<ServerCerts>[src]

The ServerCerts.

pub fn host(&self) -> &str[src]

The host.

pub fn addr(&self) -> &str[src]

The socket address.

pub fn use_tls(&self) -> bool[src]

Whether TLS or a plain TCP connection is to be used.

pub fn dbuser(&self) -> &str[src]

The database user.

pub fn password(&self) -> &SecUtf8[src]

The password.

pub fn clientlocale(&self) -> Option<&str>[src]

The client locale.

pub fn dbname(&self) -> Option<String>[src]

The name of the (MDC) database.

pub fn network_group(&self) -> Option<String>[src]

The name of a network group.

Trait Implementations

impl Clone for ConnectParams[src]

impl Debug for ConnectParams[src]

impl Display for ConnectParams[src]

impl IntoConnectParams for ConnectParams[src]

impl IntoConnectParams for &ConnectParams[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,