[−][src]Struct hdbconnect::ConnectParams
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]
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]
pub fn clone(&self) -> ConnectParams
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ConnectParams
[src]
impl Display for ConnectParams
[src]
impl IntoConnectParams for ConnectParams
[src]
pub fn into_connect_params(self) -> HdbResult<ConnectParams>
[src]
impl IntoConnectParams for &ConnectParams
[src]
pub fn into_connect_params(self) -> HdbResult<ConnectParams>
[src]
Auto Trait Implementations
impl RefUnwindSafe for ConnectParams
[src]
impl Send for ConnectParams
[src]
impl Sync for ConnectParams
[src]
impl Unpin for ConnectParams
[src]
impl UnwindSafe for ConnectParams
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,