1#![allow(clippy::mutable_key_type, clippy::inline_always)]
2
3mod accessor;
4pub(crate) mod bucket;
5mod client;
6mod config;
7mod discovery;
8mod error;
9mod instance;
10mod manager;
11pub(crate) mod metadata;
12mod pool;
13mod strategy;
14mod tls;
15pub(crate) mod topology;
16
17pub use client::*;
18pub use config::*;
19pub use error::*;
20pub use strategy::*;
21pub use topology::view::{BucketMap, Instance, Replicaset, Tier, Topology};
22
23pub async fn connect(config: &str) -> Result<Client, Error> {
37 let cfg = Config::from(config.parse::<pg::Config>()?);
38 Client::new(cfg).await
39}
40
41pub async fn connect_cfg(cfg: Config) -> Result<Client, Error> {
55 Client::new(cfg).await
56}