pub async fn read_env_vars(&mut self) -> Result<&mut Self, Error> {
        if let Some((host, port)) = get_host_port()? {
            self.host_port(host, port);
        } else if let Some(path) = get_env("EDGEDB_CREDENTIALS_FILE")? {
            self.read_credentials(path).await?;
        } else if let Some(instance) = get_env("EDGEDB_INSTANCE")? {
            self.read_instance(&instance).await?;
        } else if let Some(dsn) = get_env("EDGEDB_DSN")? {
            self.read_dsn(&dsn).await.map_err(|e|
                e.context("cannot parse env var EDGEDB_DNS"))?;
        }
        if let Some(database) = get_env("EDGEDB_DATABASE")? {
            self.database = database;
        }
        if let Some(user) = get_env("EDGEDB_USER")? {
            self.user = user;
        }
        if let Some(password) = get_env("EDGEDB_PASSWORD")? {
            self.password = Some(password);
        }
        if let Some(sec) = get_env("EDGEDB_CLIENT_TLS_SECURITY")? {
            self.tls_security = match &sec[..] {
                "default" => TlsSecurity::Default,
                "insecure" => TlsSecurity::Insecure,
                "no_host_verification" => TlsSecurity::NoHostVerification,
                "strict" => TlsSecurity::Strict,
                _ => {
                    return Err(ClientError::with_message(
                        format!("Invalid value {:?} for env var \
                                EDGEDB_CLIENT_TLS_SECURITY. \
                                Options: default, insecure, \
                                no_host_verification, strict.",
                                sec)
                    ));
                }
            };
        }
        self.read_extra_env_vars()?;
        Ok(self)
    }
/// Read environment variables and set respective configuration parameters.
///
/// This function initializes the builder if one of the following is set:
///
/// * `EDGEDB_CREDENTIALS_FILE`
/// * `EDGEDB_INSTANCE`
/// * `EDGEDB_DSN`
/// * `EDGEDB_HOST` or `EDGEDB_PORT`
///
/// If it finds one of these then it will reset all previously set
/// credentials.
///
/// If one of the following are set:
///
/// * `EDGEDB_DATABASE`
/// * `EDGEDB_USER`
/// * `EDGEDB_PASSWORD`
///
/// Then the value of that environment variable will be used to set just
/// the parameter matching that environment variable.
///
/// The `insecure_dev_mode` and connection parameters are never modified by
/// this function for now.
Read environment variables and set respective configuration parameters.
This function initializes the builder if one of the following is set.



If it finds one of these then it will reset all previously set
credentials.

If one of the following are set.



Then the value of that environment variable will be used to set just
the parameter matching that environment variable.

The `insecure_dev_mode` and connection parameters are never modified by
this function for now.
Read environment variables and set respective configuration parameters . This function initializes the builder if one of the following is set . If it finds one of these then it will reset all previously set credentials . If one of the following are set . Then the value of that environment variable will be used to set just the parameter matching that environment variable . The ` insecure_dev_mode ` and connection parameters are never modified by this function for now .
pub async fn read_env_vars(&mut self) -> Result<&mut Self, Error> {
        if let Some((host, port)) = get_host_port()? {
            self.host_port(host, port);
        } else if let Some(path) = get_env("EDGEDB_CREDENTIALS_FILE")? {
            self.read_credentials(path).await?;
        } else if let Some(instance) = get_env("EDGEDB_INSTANCE")? {
            self.read_instance(&instance).await?;
        } else if let Some(dsn) = get_env("EDGEDB_DSN")? {
            self.read_dsn(&dsn).await.map_err(|e|
                e.context("cannot parse env var EDGEDB_DNS"))?;
        }
        if let Some(database) = get_env("EDGEDB_DATABASE")? {
            self.database = database;
        }
        if let Some(user) = get_env("EDGEDB_USER")? {
            self.user = user;
        }
        if let Some(password) = get_env("EDGEDB_PASSWORD")? {
            self.password = Some(password);
        }
        if let Some(sec) = get_env("EDGEDB_CLIENT_TLS_SECURITY")? {
            self.tls_security = match &sec[..] {
                "default" => TlsSecurity::Default,
                "insecure" => TlsSecurity::Insecure,
                "no_host_verification" => TlsSecurity::NoHostVerification,
                "strict" => TlsSecurity::Strict,
                _ => {
                    return Err(ClientError::with_message(
                        format!("Invalid value {:?} for env var \
                                EDGEDB_CLIENT_TLS_SECURITY. \
                                Options: default, insecure, \
                                no_host_verification, strict.",
                                sec)
                    ));
                }
            };
        }
        self.read_extra_env_vars()?;
        Ok(self)
    }
pub async fn read_env_vars ( & mut self ) -> Result < & mut Self , Error > { if let Some ( ( host , port ) ) = get_host_port ( ) ? { self . host_port ( host , port ) ; } else if let Some ( path ) = get_env ( " " ) ? { self . read_credentials ( path ) . await ? ; } else if let Some ( instance ) = get_env ( " " ) ? { self . read_instance ( & instance ) . await ? ; } else if let Some ( dsn ) = get_env ( " " ) ? { self . read_dsn ( & dsn ) . await . map_err ( | e | e . context ( " " ) ) ? ; } if let Some ( database ) = get_env ( " " ) ? { self . database = database ; } if let Some ( user ) = get_env ( " " ) ? { self . user = user ; } if let Some ( password ) = get_env ( " " ) ? { self . password = Some ( password ) ; } if let Some ( sec ) = get_env ( " " ) ? { self . tls_security = match & sec [ .. ] { " " => TlsSecurity :: Default , " " => TlsSecurity :: Insecure , " " => TlsSecurity :: NoHostVerification , " " => TlsSecurity :: Strict , _ => { return Err ( ClientError :: with_message ( format ! ( " \
 \
 \
 " sec ) ) ) ; } } ; } self . read_extra_env_vars ( ) ? ; Ok ( self ) }
Read environment variables and set respective configuration parameters.
Read environment variables and set respective configuration parameters .
&mut self