pub fn connect_with_options(
        connection_string: impl Into<String>,
        opts: ClusterOptions,
    ) -> Self {
        let mut connection_string = connection_string.into();
        let to_append = opts.to_conn_string();
        if !to_append.is_empty() {}
        if connection_string.contains("?") {
            connection_string = format!("{}&{}", connection_string, to_append);
        } else {
            connection_string = format!("{}?{}", connection_string, to_append);
        }
        let mut username = opts.username;
        let mut password = opts.password;
        if let Some(auth) = opts.authenticator {
            if let Some(u) = auth.username() {
                username = Some(u.clone());
            }
            if let Some(p) = auth.password() {
                password = Some(p.clone());
            }
            if let Some(path) = auth.certificate_path() {
                connection_string = format!("{}&certpath={}", connection_string, path.clone());
            }
            if let Some(path) = auth.key_path() {
                connection_string = format!("{}&keypath={}", connection_string, path.clone());
            }
        }

        Cluster {
            core: Arc::new(Core::new(connection_string.into(), username, password)),
        }
    }
// This will likely move to become the actual connect function before beta.
This will likely move to become the actual connect function before beta.
This will likely move to become the actual connect function before beta .
pub fn connect_with_options(
        connection_string: impl Into<String>,
        opts: ClusterOptions,
    ) -> Self {
        let mut connection_string = connection_string.into();
        let to_append = opts.to_conn_string();
        if !to_append.is_empty() {}
        if connection_string.contains("?") {
            connection_string = format!("{}&{}", connection_string, to_append);
        } else {
            connection_string = format!("{}?{}", connection_string, to_append);
        }
        let mut username = opts.username;
        let mut password = opts.password;
        if let Some(auth) = opts.authenticator {
            if let Some(u) = auth.username() {
                username = Some(u.clone());
            }
            if let Some(p) = auth.password() {
                password = Some(p.clone());
            }
            if let Some(path) = auth.certificate_path() {
                connection_string = format!("{}&certpath={}", connection_string, path.clone());
            }
            if let Some(path) = auth.key_path() {
                connection_string = format!("{}&keypath={}", connection_string, path.clone());
            }
        }
        Cluster {
            core: Arc::new(Core::new(connection_string.into(), username, password)),
        }
    }
pub fn connect_with_options ( connection_string : impl Into < String > , opts : ClusterOptions , ) -> Self { let mut connection_string = connection_string . into ( ) ; let to_append = opts . to_conn_string ( ) ; if ! to_append . is_empty ( ) { } if connection_string . contains ( " " ) { connection_string = format ! ( " " connection_string to_append ) ; } else { connection_string = format ! ( " " connection_string to_append ) ; } let mut username = opts . username ; let mut password = opts . password ; if let Some ( auth ) = opts . authenticator { if let Some ( u ) = auth . username ( ) { username = Some ( u . clone ( ) ) ; } if let Some ( p ) = auth . password ( ) { password = Some ( p . clone ( ) ) ; } if let Some ( path ) = auth . certificate_path ( ) { connection_string = format ! ( " " connection_string path clone ( ) ) ; } if let Some ( path ) = auth . key_path ( ) { connection_string = format ! ( " " connection_string path clone ( ) ) ; } } Cluster { core : Arc :: new ( Core :: new ( connection_string . into ( ) , username , password ) ) , } }
This will likely move to become the actual connect function before beta.
This will likely move to become the actual connect function before beta .
connection_string
impl Into<String>
opts
ClusterOptions
connection_string
impl Into<String>
opts
ClusterOptions