Expand description
Binary encode/decode for PostgreSQL types.
All decoding operates on raw byte slices (from the arena or wire buffer).
Encoding appends big-endian bytes to a Vec<u8>.
PostgreSQL binary format is big-endian for all numeric types.
Traits§
- Encode
- Encode a Rust value into PostgreSQL binary format.
Functions§
- decode_
array_ bool - Decode a PG binary array of booleans.
- decode_
array_ bytea - Decode a PG binary array of bytea values.
- decode_
array_ f32 - Decode a PG binary array of f32.
- decode_
array_ f64 - Decode a PG binary array of f64.
- decode_
array_ i16 - Decode a PG binary array of i16.
- decode_
array_ i32 - Decode a PG binary array of i32.
- decode_
array_ i64 - Decode a PG binary array of i64.
- decode_
array_ str - Decode a PG binary array of text/varchar strings.
- decode_
bool - Decode a boolean from binary format (1 byte: 0x00 = false, 0x01 = true).
- decode_
bytes - Decode raw bytes (bytea) — identity function, zero-copy.
- decode_
f32 - Decode a 32-bit float from binary format (4 bytes, big-endian IEEE 754).
- decode_
f64 - Decode a 64-bit float from binary format (8 bytes, big-endian IEEE 754).
- decode_
i16 - Decode a 16-bit integer from binary format (2 bytes, big-endian).
- decode_
i32 - Decode a 32-bit integer from binary format (4 bytes, big-endian).
- decode_
i64 - Decode a 64-bit integer from binary format (8 bytes, big-endian).
- decode_
str - Decode a UTF-8 string from binary format (variable length).
- decode_
uuid - Decode a UUID from binary format (exactly 16 bytes).
- encode_
param - Encode a parameter value into the wire buffer with its 4-byte length prefix.