Skip to main content

ToPg

Trait ToPg 

Source
pub trait ToPg {
    // Required method
    fn to_pg(&self) -> (Vec<u8>, u32, i16);
}
Expand description

Trait for converting Rust types to PostgreSQL wire format.

Required Methods§

Source

fn to_pg(&self) -> (Vec<u8>, u32, i16)

Convert to PostgreSQL wire format. Returns (bytes, oid, format_code)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ToPg for &[u8]

Source§

fn to_pg(&self) -> (Vec<u8>, u32, i16)

Source§

impl ToPg for &str

Source§

fn to_pg(&self) -> (Vec<u8>, u32, i16)

Source§

impl ToPg for String

Source§

fn to_pg(&self) -> (Vec<u8>, u32, i16)

Source§

impl ToPg for Vec<u8>

Source§

fn to_pg(&self) -> (Vec<u8>, u32, i16)

Source§

impl ToPg for bool

Source§

fn to_pg(&self) -> (Vec<u8>, u32, i16)

Source§

impl ToPg for f64

Source§

fn to_pg(&self) -> (Vec<u8>, u32, i16)

Source§

impl ToPg for i32

Source§

fn to_pg(&self) -> (Vec<u8>, u32, i16)

Source§

impl ToPg for i64

Source§

fn to_pg(&self) -> (Vec<u8>, u32, i16)

Implementors§