[−][src]Trait tokio_postgres::types::ToSql
A trait for types that can be converted into Postgres values.
Types
The following implementations are provided by this crate, along with the corresponding Postgres types:
| Rust type | Postgres type(s) |
|---|---|
bool | BOOL |
i8 | "char" |
i16 | SMALLINT, SMALLSERIAL |
i32 | INT, SERIAL |
u32 | OID |
i64 | BIGINT, BIGSERIAL |
f32 | REAL |
f64 | DOUBLE PRECISION |
&str/String | VARCHAR, CHAR(n), TEXT, CITEXT, NAME |
&[u8]/Vec<u8> | BYTEA |
HashMap<String, Option<String>> | HSTORE |
SystemTime | TIMESTAMP, TIMESTAMP WITH TIME ZONE |
IpAddr | INET |
In addition, some implementations are provided for types in third party
crates. These are disabled by default; to opt into one of these
implementations, activate the Cargo feature corresponding to the crate's
name prefixed by with-. For example, the with-serde_json-1 feature enables
the implementation for the serde_json::Value type.
| Rust type | Postgres type(s) |
|---|---|
chrono::NaiveDateTime | TIMESTAMP |
chrono::DateTime<Utc> | TIMESTAMP WITH TIME ZONE |
chrono::DateTime<Local> | TIMESTAMP WITH TIME ZONE |
chrono::DateTime<FixedOffset> | TIMESTAMP WITH TIME ZONE |
chrono::NaiveDate | DATE |
chrono::NaiveTime | TIME |
time::PrimitiveDateTime | TIMESTAMP |
time::OffsetDateTime | TIMESTAMP WITH TIME ZONE |
time::Date | DATE |
time::Time | TIME |
eui48::MacAddress | MACADDR |
geo_types::Point<f64> | POINT |
geo_types::Rect<f64> | BOX |
geo_types::LineString<f64> | PATH |
serde_json::Value | JSON, JSONB |
uuid::Uuid | UUID |
bit_vec::BitVec | BIT, VARBIT |
eui48::MacAddress | MACADDR |
Nullability
In addition to the types listed above, ToSql is implemented for
Option<T> where T implements ToSql. An Option<T> represents a
nullable Postgres value.
Arrays
ToSql is implemented for Vec<T> and &[T] where T implements ToSql,
and corresponds to one-dimensional Postgres arrays with an index offset of 1.
Required methods
pub fn to_sql(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
Converts the value of self into the binary format of the specified
Postgres Type, appending it to out.
The caller of this method is responsible for ensuring that this type
is compatible with the Postgres Type.
The return value indicates if this value should be represented as
NULL. If this is the case, implementations must not write
anything to out.
pub fn accepts(ty: &Type) -> bool[src]
Determines if a value of this type can be converted to the specified
Postgres Type.
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
An adaptor method used internally by Rust-Postgres.
All implementations of this method should be generated by the
to_sql_checked!() macro.
Trait Implementations
impl<'_> BorrowToSql for &'_ (dyn ToSql + '_)[src]
pub fn borrow_to_sql(&self) -> &dyn ToSql[src]
Implementations on Foreign Types
impl ToSql for PrimitiveDateTime[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for DateTime<FixedOffset>[src]
pub fn to_sql(
&self,
type_: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
type_: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for Date[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl<'a, T> ToSql for &'a T where
T: ToSql, [src]
T: ToSql,
pub fn to_sql(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for i16[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for f32[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for bool[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for Value[src]
pub fn to_sql(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for DateTime<Utc>[src]
pub fn to_sql(
&self,
type_: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
type_: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for LineString<f64>[src]
pub fn to_sql(
&self,
&Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for Rect<f64>[src]
pub fn to_sql(
&self,
&Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl<T> ToSql for Vec<T, Global> where
T: ToSql, [src]
T: ToSql,
pub fn to_sql(
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for OffsetDateTime[src]
pub fn to_sql(
&self,
type_: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
type_: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for IpAddr[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for i32[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for i64[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for DateTime<Local>[src]
pub fn to_sql(
&self,
type_: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
type_: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl<T> ToSql for Option<T> where
T: ToSql, [src]
T: ToSql,
pub fn to_sql(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl<'a> ToSql for &'a [u8][src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for Time[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for NaiveDate[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for NaiveTime[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl<'a> ToSql for Cow<'a, str>[src]
pub fn to_sql(
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl<H> ToSql for HashMap<String, Option<String>, H> where
H: BuildHasher, [src]
H: BuildHasher,
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for String[src]
pub fn to_sql(
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl<'a, T> ToSql for &'a [T] where
T: ToSql, [src]
T: ToSql,
pub fn to_sql(
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for NaiveDateTime[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for u32[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for SystemTime[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for f64[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for MacAddress[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for Point<f64>[src]
pub fn to_sql(
&self,
&Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for Vec<u8, Global>[src]
pub fn to_sql(
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for Uuid[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for i8[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl<'a> ToSql for &'a str[src]
pub fn to_sql(
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
w: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl ToSql for BitVec<u32>[src]
pub fn to_sql(
&self,
&Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
&Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
Implementors
impl<T> ToSql for tokio_postgres::types::Date<T> where
T: ToSql, [src]
T: ToSql,
pub fn to_sql(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl<T> ToSql for Timestamp<T> where
T: ToSql, [src]
T: ToSql,
pub fn to_sql(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
pub fn accepts(ty: &Type) -> bool[src]
pub fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>[src]
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + 'static + Sync + Send, Global>>
impl<T> ToSql for Json<T> where
T: Serialize + Debug, [src]
T: Serialize + Debug,