1#[warn(missing_docs)]
2
3mod builder;
4mod debug;
5mod sealed;
6mod traits;
7
8#[cfg(feature="unstable")]
9pub mod tls;
10#[cfg(not(feature="unstable"))]
11mod tls;
12
13#[cfg(feature="unstable")]
14pub mod client;
15#[cfg(not(feature="unstable"))]
16mod client;
17
18#[cfg(feature="unstable")]
19pub mod reader;
20#[cfg(not(feature="unstable"))]
21mod reader;
22
23#[cfg(feature="unstable")]
24pub mod credentials;
25#[cfg(not(feature="unstable"))]
26mod credentials;
27
28#[cfg(feature="unstable")]
29pub mod server_params;
30#[cfg(not(feature="unstable"))]
31mod server_params;
32
33pub mod errors;
34
35pub use builder::{Builder, Config};
36pub use pool::Client;
37pub use errors::{Error};
38pub use traits::{Executor, ExecuteResult};
39
40pub use edgedb_protocol::model;
41pub use edgedb_protocol::query_arg::{QueryArg, QueryArgs};
42pub use edgedb_protocol::{QueryResult};
43
44#[cfg(feature="derive")]
45pub use edgedb_derive::Queryable;
46
47mod pool;
48
49pub async fn connect() -> Result<Client, Error> {
62 let pool = Client::new(Builder::from_env().await?.build()?);
63 pool.ensure_connected().await?;
64 Ok(pool)
65}