Skip to main content

connect_one

Function connect_one 

Source
pub async fn connect_one(url: &str, application_name: &str) -> Result<Client>
Expand description

Open a single connection using the same SSL fallback, auth retry, and application-name path as create_pool.

For one-shot commands that open exactly one connection and exit (doctor sweeps, the patient-portal flag lookup in lifecycle subcommands, etc.). Internally builds a pool, takes one client out, then drops the pool. The returned client owns its connection driver task — it remains usable after the pool is gone.