Skip to main content

FixedWireSize

Trait FixedWireSize 

Source
pub trait FixedWireSize {
    const WIRE_SIZE: usize;
}
Expand description

Marker trait for types with a fixed wire size in PostgreSQL binary protocol.

This trait is only implemented for types that have a guaranteed fixed size on the wire. For use with RefFromRow, wrap types in LengthPrefixed<T> to account for PostgreSQL’s length prefix.

Required Associated Constants§

Source

const WIRE_SIZE: usize

The fixed size in bytes on the wire.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FixedWireSize for i8

Source§

impl FixedWireSize for u8

Implementors§