postgresql_protocol/postgresql_protocol.rs
1//! PostgreSQL wire protocol: message encoding/decoding, type OIDs, and the
2//! authentication state machine.
3//!
4//! This crate is intentionally free of any async runtime. It operates on
5//! [`bytes::BytesMut`] buffers and is shared between the `postgresql` client
6//! and the compile-time query macros, so both understand the protocol from a
7//! single implementation.
8
9#![forbid(unsafe_code)]
10#![warn(missing_docs)]
11// Length and count fields are untrusted on both directions; a truncating or
12// sign-changing cast is a protocol-smuggling bug so the whole crate must be free of them.
13#![deny(clippy::cast_possible_truncation, clippy::cast_possible_wrap, clippy::cast_sign_loss)]
14
15pub mod backend;
16pub mod error;
17pub mod frontend;
18pub mod oid;
19pub mod scram;
20
21pub use backend::{BackendMessage, DEFAULT_MAX_MESSAGE_LEN, FieldDescription, decode, decode_with_limit};
22pub use error::{DbError, Error};
23pub use oid::{Format, Oid, PgType};
24pub use scram::ScramClient;