Expand description
PostgreSQL wire protocol encoding and decoding primitives.
PostgreSQL uses big-endian (network byte order) for all integers.
Structs§
- Message
Builder - Message builder helper that handles the length field.
Functions§
- read_
bytes - Read fixed-length bytes.
- read_
cstr - Read null-terminated string as &str.
- read_
cstring - Read null-terminated string (PostgreSQL String type). Returns the string bytes (without the null terminator) and remaining data.
- read_
i16 - Read 2-byte big-endian signed integer.
- read_
i32 - Read 4-byte big-endian signed integer.
- read_u8
- Read 1-byte unsigned integer.
- read_
u16 - Read 2-byte big-endian unsigned integer.
- read_
u32 - Read 4-byte big-endian unsigned integer.
- write_
bytes - Write raw bytes.
- write_
cstr - Write null-terminated string from &str.
- write_
cstring - Write null-terminated string (PostgreSQL String type).
- write_
i16 - Write 2-byte big-endian signed integer.
- write_
i32 - Write 4-byte big-endian signed integer.
- write_
u8 - Write 1-byte unsigned integer.
- write_
u16 - Write 2-byte big-endian unsigned integer.
- write_
u32 - Write 4-byte big-endian unsigned integer.