[−][src]Struct hdbconnect::ConnectParamsBuilder
A builder for ConnectParams
.
Note that some methods are not included by default, but require to build hdbconnect
with
the respective feature(s).
Example
use hdbconnect::ConnectParams; let connect_params = ConnectParams::builder() .hostname("abcd123") .port(2222) .dbuser("MEIER") .password("schlau") .build() .unwrap();
Methods
impl ConnectParamsBuilder
[src]
impl ConnectParamsBuilder
pub fn new() -> ConnectParamsBuilder | [src] |
Creates a new builder.
pub fn hostname<H: AsRef<str>>( | [src] |
Sets the hostname.
pub fn port(&mut self, port: u16) -> &mut ConnectParamsBuilder | [src] |
Sets the port.
pub fn dbuser<D: AsRef<str>>(&mut self, dbuser: D) -> &mut ConnectParamsBuilder | [src] |
Sets the database user.
pub fn password<P: AsRef<str>>(&mut self, pw: P) -> &mut ConnectParamsBuilder | [src] |
Sets the password.
pub fn clientlocale<P: AsRef<str>>( | [src] |
Sets the client locale.
pub fn clientlocale_from_env_lang(&mut self) -> &mut ConnectParamsBuilder | [src] |
Sets the client locale from the value of the environment variable LANG
pub fn tls_with( | [src] |
Makes the driver use TLS for the connection to the database.
Requires that the server's certificate is provided with one of the
enum variants of ServerCerts
.
Example:
let mut conn_params = ConnectParams::builder() // ...more settings required... .tls_with(ServerCerts::Direct(string_with_certificate)) .build();
This method is only available with feature tls
.
pub fn option<'a>( | [src] |
Adds a runtime parameter.
pub fn build(&mut self) -> HdbResult<ConnectParams> | [src] |
Constructs a ConnectParams
from the builder.
Trait Implementations
impl Default for ConnectParamsBuilder
[src]
impl Default for ConnectParamsBuilder
fn default() -> ConnectParamsBuilder | [src] |
impl Clone for ConnectParamsBuilder
[src]
impl Clone for ConnectParamsBuilder
fn clone(&self) -> ConnectParamsBuilder | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
impl Debug for ConnectParamsBuilder
[src]
impl Debug for ConnectParamsBuilder
Auto Trait Implementations
impl Send for ConnectParamsBuilder
impl Send for ConnectParamsBuilder
impl Sync for ConnectParamsBuilder
impl Sync for ConnectParamsBuilder
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> Same for T
impl<T> Same for T
type Output = T
Should always be Self