1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! Minimal async PostgreSQL wire protocol v3 client.
//!
//! `pg-wired` is the lowest-level crate in the resolute workspace. It speaks
//! the PostgreSQL frontend/backend protocol directly over a [`tokio`] socket,
//! with no SQL parsing, no type system, and no high-level query API. If you
//! want a typed, derive-driven query layer, use the [`resolute`] crate instead;
//! this crate is the foundation it builds on.
//!
//! # Protocol features
//!
//! - **Startup, authentication.** Cleartext, MD5, and SCRAM-SHA-256 (including
//! channel binding when the connection is TLS-wrapped).
//! - **Extended query protocol.** `Parse` / `Bind` / `Describe` / `Execute` /
//! `Sync` with statement caching at the connection layer.
//! - **Pipelining.** Multiple round trips fused into a single write via
//! [`PgPipeline`], with FIFO response matching.
//! - **Streaming.** Backpressure-aware row streaming for large result sets.
//! - **`COPY` in / out.** Both CSV and binary formats.
//! - **`LISTEN` / `NOTIFY`.** Bounded notification channel with a dropped-
//! notification counter.
//! - **Cancellation.** Out-of-band cancel via [`CancelToken`] using the
//! server-issued backend key.
//! - **TLS.** Optional, gated behind the `tls` feature; uses `rustls`.
//!
//! # Where to start
//!
//! - [`AsyncConn`] is the main entry point: a single PostgreSQL connection
//! wrapped around the protocol state machine.
//! - [`AsyncPool`] is a thin pool over [`AsyncConn`].
//! - [`PgPipeline`] batches multiple operations into one round trip.
//! - [`tls::TlsMode`] selects between plaintext and TLS connections.
//!
//! # Stability
//!
//! The public surface is intended to be stable, but `pg-wired` is primarily
//! consumed by `resolute` and its sibling crates. Most application code should
//! prefer the typed [`resolute`] surface.
//!
//! [`resolute`]: https://docs.rs/resolute
//! [`tokio`]: https://docs.rs/tokio
pub use ;
pub use AsyncPool;
pub use CancelToken;
pub use WireConn;
pub use PgWireError;
pub use PgPipeline;
pub use ;
pub use TlsConfig;
pub use TlsMode;