pub trait ToSql {
// Required method
fn to_sql(&self) -> PgValue;
// Provided method
fn type_oid(&self) -> u32 { ... }
}Expand description
Trait for converting Rust types to PostgreSQL parameter values.
Replaces the older ToParam — provides the same functionality with
a more standard name and the ability to specify the OID.