pub trait ToSql {
// Required method
fn to_sql(&self, ty: Type, out: &mut Vec<u8>) -> Result<Encoded, Error>;
}Expand description
A Rust value that can be a statement parameter.
The server says which type each parameter has (from the SQL, as if the
parameter were an untyped literal); to_sql appends the value in that
type’s binary format or as text, and says which. Implement it for your own
types by delegating to one of the implementations here.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".