pub trait ToSql: Send + Sync {
// Required methods
fn encode(&self, buf: &mut BytesMut) -> Result<IsNull, Error>;
fn oid(&self) -> Oid;
}Expand description
A value that can be bound as a query parameter in the binary format.
This trait is object-safe, so &[&dyn ToSql] is the parameter list the
macros build. See StaticType for the compile-time type OID.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".