pub trait FromSql<A, DB: Backend>: Sized {
// Required method
fn from_sql(bytes: DB::RawValue<'_>) -> Result<Self>;
// Provided method
fn from_nullable_sql(bytes: Option<DB::RawValue<'_>>) -> Result<Self> { ... }
}
Expand description
Deserialize a single field of a given SQL type.
When possible, implementations of this trait should prefer to use an
existing implementation, rather than reading from bytes
. (For example, if
you are implementing this for an enum which is represented as an integer in
the database, prefer i32::from_sql(bytes)
(or the explicit form
<i32 as FromSql<Integer, DB>>::from_sql(bytes)
) over reading from bytes
directly)
Types which implement this trait should also have #[derive(FromSqlRow)]
§Backend specific details
- For PostgreSQL, the bytes will be sent using the binary protocol, not text.
- For SQLite, the actual type of
DB::RawValue
is private API. All implementations of this trait must be written in terms of an existing primitive. - For MySQL, the value of
bytes
will depend on the return value oftype_metadata
for the given SQL type. SeeMysqlType
for details. - For third party backends, consult that backend’s documentation.
§Examples
Most implementations of this trait will be defined in terms of an existing implementation.
#[repr(i32)]
#[derive(Debug, Clone, Copy, FromSqlRow)]
pub enum MyEnum {
A = 1,
B = 2,
}
impl<DB> FromSql<Integer, DB> for MyEnum
where
DB: Backend,
i32: FromSql<Integer, DB>,
{
fn from_sql(bytes: DB::RawValue<'_>) -> deserialize::Result<Self> {
match i32::from_sql(bytes)? {
1 => Ok(MyEnum::A),
2 => Ok(MyEnum::B),
x => Err(format!("Unrecognized variant {}", x).into()),
}
}
}
Required Methods§
Provided Methods§
Sourcefn from_nullable_sql(bytes: Option<DB::RawValue<'_>>) -> Result<Self>
fn from_nullable_sql(bytes: Option<DB::RawValue<'_>>) -> Result<Self>
A specialized variant of from_sql
for handling null values.
The default implementation returns an UnexpectedNullError
for
an encountered null value and calls Self::from_sql
otherwise
If your custom type supports null values you need to provide a custom implementation.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl FromSql<BigInt, Mysql> for i64
Available on crate feature mysql_backend
only.
impl FromSql<BigInt, Mysql> for i64
mysql_backend
only.fn from_sql(value: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<BigInt, Sqlite> for i64
Available on crate feature sqlite
only.
impl FromSql<BigInt, Sqlite> for i64
sqlite
only.fn from_sql(value: SqliteValue<'_, '_, '_>) -> Result<Self>
Source§impl FromSql<Binary, Mysql> for *const [u8]
Available on crate feature mysql_backend
only.
impl FromSql<Binary, Mysql> for *const [u8]
mysql_backend
only.The returned pointer is only valid for the lifetime to the argument of
from_sql
. This impl is intended for uses where you want to write a new
impl in terms of Vec<u8>
, but don’t want to allocate. We have to return a
raw pointer instead of a reference with a lifetime due to the structure of
FromSql
fn from_sql(value: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Binary, Pg> for *const [u8]
Available on crate feature postgres_backend
only.
impl FromSql<Binary, Pg> for *const [u8]
postgres_backend
only.The returned pointer is only valid for the lifetime to the argument of
from_sql
. This impl is intended for uses where you want to write a new
impl in terms of Vec<u8>
, but don’t want to allocate. We have to return a
raw pointer instead of a reference with a lifetime due to the structure of
FromSql
Source§impl FromSql<Binary, Sqlite> for *const [u8]
Available on crate feature sqlite
only.
impl FromSql<Binary, Sqlite> for *const [u8]
sqlite
only.The returned pointer is only valid for the lifetime to the argument of
from_sql
. This impl is intended for uses where you want to write a new
impl in terms of Vec<u8>
, but don’t want to allocate. We have to return a
raw pointer instead of a reference with a lifetime due to the structure of
FromSql
fn from_sql(bytes: SqliteValue<'_, '_, '_>) -> Result<Self>
Source§impl FromSql<Bool, Mysql> for bool
Available on crate feature mysql_backend
only.
impl FromSql<Bool, Mysql> for bool
mysql_backend
only.fn from_sql(bytes: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Bool, Sqlite> for bool
Available on crate feature sqlite
only.
impl FromSql<Bool, Sqlite> for bool
sqlite
only.fn from_sql(value: SqliteValue<'_, '_, '_>) -> Result<Self>
Source§impl FromSql<Cidr, Pg> for IpNetwork
Available on crate features network-address
and postgres_backend
only.
impl FromSql<Cidr, Pg> for IpNetwork
network-address
and postgres_backend
only.Source§impl FromSql<Date, Mysql> for NaiveDate
Available on crate features chrono
and mysql_backend
only.
impl FromSql<Date, Mysql> for NaiveDate
chrono
and mysql_backend
only.fn from_sql(bytes: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Date, Mysql> for Date
Available on crate features time
and mysql_backend
only.
impl FromSql<Date, Mysql> for Date
time
and mysql_backend
only.fn from_sql(bytes: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Date, Pg> for NaiveDate
Available on crate features chrono
and postgres_backend
only.
impl FromSql<Date, Pg> for NaiveDate
chrono
and postgres_backend
only.Source§impl FromSql<Date, Sqlite> for String
Available on crate feature sqlite
only.
impl FromSql<Date, Sqlite> for String
sqlite
only.fn from_sql(value: SqliteValue<'_, '_, '_>) -> Result<Self>
Source§impl FromSql<Datetime, Mysql> for NaiveDateTime
Available on crate features chrono
and mysql_backend
only.
impl FromSql<Datetime, Mysql> for NaiveDateTime
chrono
and mysql_backend
only.fn from_sql(bytes: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Datetime, Mysql> for OffsetDateTime
Available on crate features time
and mysql_backend
only.
impl FromSql<Datetime, Mysql> for OffsetDateTime
time
and mysql_backend
only.fn from_sql(bytes: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Datetime, Mysql> for PrimitiveDateTime
Available on crate features time
and mysql_backend
only.
impl FromSql<Datetime, Mysql> for PrimitiveDateTime
time
and mysql_backend
only.fn from_sql(bytes: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Double, Mysql> for f64
Available on crate feature mysql_backend
only.
impl FromSql<Double, Mysql> for f64
mysql_backend
only.fn from_sql(value: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Double, Sqlite> for f64
Available on crate feature sqlite
only.
impl FromSql<Double, Sqlite> for f64
sqlite
only.fn from_sql(value: SqliteValue<'_, '_, '_>) -> Result<Self>
Source§impl FromSql<Float, Mysql> for f32
Available on crate feature mysql_backend
only.
impl FromSql<Float, Mysql> for f32
mysql_backend
only.fn from_sql(value: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Float, Sqlite> for f32
Available on crate feature sqlite
only.
impl FromSql<Float, Sqlite> for f32
sqlite
only.fn from_sql(value: SqliteValue<'_, '_, '_>) -> Result<Self>
Source§impl FromSql<Inet, Pg> for IpNetwork
Available on crate features network-address
and postgres_backend
only.
impl FromSql<Inet, Pg> for IpNetwork
network-address
and postgres_backend
only.Source§impl FromSql<Integer, Mysql> for i32
Available on crate feature mysql_backend
only.
impl FromSql<Integer, Mysql> for i32
mysql_backend
only.fn from_sql(value: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Integer, Sqlite> for i32
Available on crate feature sqlite
only.
impl FromSql<Integer, Sqlite> for i32
sqlite
only.fn from_sql(value: SqliteValue<'_, '_, '_>) -> Result<Self>
Source§impl FromSql<Interval, Pg> for Duration
Available on crate features chrono
and postgres_backend
only.
impl FromSql<Interval, Pg> for Duration
chrono
and postgres_backend
only.Source§impl FromSql<Json, Mysql> for Value
Available on crate features serde_json
and mysql_backend
only.
impl FromSql<Json, Mysql> for Value
serde_json
and mysql_backend
only.fn from_sql(value: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Json, Pg> for Value
Available on crate features serde_json
and postgres_backend
only.
impl FromSql<Json, Pg> for Value
serde_json
and postgres_backend
only.Source§impl FromSql<Jsonb, Pg> for Value
Available on crate features serde_json
and postgres_backend
only.
impl FromSql<Jsonb, Pg> for Value
serde_json
and postgres_backend
only.Source§impl FromSql<Numeric, Mysql> for BigDecimal
Available on crate features numeric
and mysql_backend
only.
impl FromSql<Numeric, Mysql> for BigDecimal
numeric
and mysql_backend
only.fn from_sql(value: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Numeric, Pg> for BigDecimal
Available on crate features numeric
and postgres_backend
only.
impl FromSql<Numeric, Pg> for BigDecimal
numeric
and postgres_backend
only.Source§impl FromSql<Numeric, Sqlite> for BigDecimal
Available on crate features numeric
and sqlite
only.
impl FromSql<Numeric, Sqlite> for BigDecimal
numeric
and sqlite
only.fn from_sql(bytes: SqliteValue<'_, '_, '_>) -> Result<Self>
Source§impl FromSql<SmallInt, Mysql> for i16
Available on crate feature mysql_backend
only.
impl FromSql<SmallInt, Mysql> for i16
mysql_backend
only.fn from_sql(value: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<SmallInt, Sqlite> for i16
Available on crate feature sqlite
only.
impl FromSql<SmallInt, Sqlite> for i16
sqlite
only.fn from_sql(value: SqliteValue<'_, '_, '_>) -> Result<Self>
Source§impl FromSql<Text, Mysql> for *const str
Available on crate feature mysql_backend
only.
impl FromSql<Text, Mysql> for *const str
mysql_backend
only.The returned pointer is only valid for the lifetime to the argument of
from_sql
. This impl is intended for uses where you want to write a new
impl in terms of String
, but don’t want to allocate. We have to return a
raw pointer instead of a reference with a lifetime due to the structure of
FromSql
fn from_sql(value: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Text, Pg> for *const str
Available on crate feature postgres_backend
only.
impl FromSql<Text, Pg> for *const str
postgres_backend
only.The returned pointer is only valid for the lifetime to the argument of
from_sql
. This impl is intended for uses where you want to write a new
impl in terms of String
, but don’t want to allocate. We have to return a
raw pointer instead of a reference with a lifetime due to the structure of
FromSql
Source§impl FromSql<Text, Sqlite> for *const str
Available on crate feature sqlite
only.
impl FromSql<Text, Sqlite> for *const str
sqlite
only.The returned pointer is only valid for the lifetime to the argument of
from_sql
. This impl is intended for uses where you want to write a new
impl in terms of String
, but don’t want to allocate. We have to return a
raw pointer instead of a reference with a lifetime due to the structure of
FromSql
fn from_sql(value: SqliteValue<'_, '_, '_>) -> Result<Self>
Source§impl FromSql<Time, Mysql> for NaiveTime
Available on crate features chrono
and mysql_backend
only.
impl FromSql<Time, Mysql> for NaiveTime
chrono
and mysql_backend
only.fn from_sql(bytes: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Time, Mysql> for Time
Available on crate features time
and mysql_backend
only.
impl FromSql<Time, Mysql> for Time
time
and mysql_backend
only.fn from_sql(bytes: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Time, Pg> for NaiveTime
Available on crate features chrono
and postgres_backend
only.
impl FromSql<Time, Pg> for NaiveTime
chrono
and postgres_backend
only.Source§impl FromSql<Time, Sqlite> for String
Available on crate feature sqlite
only.
impl FromSql<Time, Sqlite> for String
sqlite
only.fn from_sql(value: SqliteValue<'_, '_, '_>) -> Result<Self>
Source§impl FromSql<Timestamp, Mysql> for NaiveDateTime
Available on crate features chrono
and mysql_backend
only.
impl FromSql<Timestamp, Mysql> for NaiveDateTime
chrono
and mysql_backend
only.fn from_sql(bytes: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Timestamp, Mysql> for OffsetDateTime
Available on crate features time
and mysql_backend
only.
impl FromSql<Timestamp, Mysql> for OffsetDateTime
time
and mysql_backend
only.fn from_sql(bytes: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Timestamp, Mysql> for PrimitiveDateTime
Available on crate features time
and mysql_backend
only.
impl FromSql<Timestamp, Mysql> for PrimitiveDateTime
time
and mysql_backend
only.fn from_sql(bytes: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Timestamp, Pg> for NaiveDateTime
Available on crate features chrono
and postgres_backend
only.
impl FromSql<Timestamp, Pg> for NaiveDateTime
chrono
and postgres_backend
only.Source§impl FromSql<Timestamp, Pg> for PrimitiveDateTime
Available on crate features time
and postgres_backend
only.
impl FromSql<Timestamp, Pg> for PrimitiveDateTime
time
and postgres_backend
only.Source§impl FromSql<Timestamp, Sqlite> for String
Available on crate feature sqlite
only.
impl FromSql<Timestamp, Sqlite> for String
sqlite
only.fn from_sql(value: SqliteValue<'_, '_, '_>) -> Result<Self>
Source§impl FromSql<Timestamp, Sqlite> for NaiveDateTime
Available on crate features chrono
and sqlite
only.
impl FromSql<Timestamp, Sqlite> for NaiveDateTime
chrono
and sqlite
only.Source§impl FromSql<Timestamp, Sqlite> for PrimitiveDateTime
Available on crate features time
and sqlite
only.
impl FromSql<Timestamp, Sqlite> for PrimitiveDateTime
time
and sqlite
only.Source§impl FromSql<Timestamptz, Pg> for DateTime<Local>
Available on crate features chrono
and postgres_backend
only.
impl FromSql<Timestamptz, Pg> for DateTime<Local>
chrono
and postgres_backend
only.Source§impl FromSql<Timestamptz, Pg> for DateTime<Utc>
Available on crate features chrono
and postgres_backend
only.
impl FromSql<Timestamptz, Pg> for DateTime<Utc>
chrono
and postgres_backend
only.Source§impl FromSql<Timestamptz, Pg> for NaiveDateTime
Available on crate features chrono
and postgres_backend
only.
impl FromSql<Timestamptz, Pg> for NaiveDateTime
chrono
and postgres_backend
only.Source§impl FromSql<Timestamptz, Pg> for OffsetDateTime
Available on crate features time
and postgres_backend
only.
impl FromSql<Timestamptz, Pg> for OffsetDateTime
time
and postgres_backend
only.Source§impl FromSql<Timestamptz, Pg> for PrimitiveDateTime
Available on crate features time
and postgres_backend
only.
impl FromSql<Timestamptz, Pg> for PrimitiveDateTime
time
and postgres_backend
only.Source§impl FromSql<Timestamptz, Sqlite> for String
Available on crate feature sqlite
only.
impl FromSql<Timestamptz, Sqlite> for String
sqlite
only.fn from_sql(value: SqliteValue<'_, '_, '_>) -> Result<Self>
Source§impl FromSql<Timestamptz, Sqlite> for DateTime<Local>
Available on crate features chrono
and sqlite
only.
impl FromSql<Timestamptz, Sqlite> for DateTime<Local>
chrono
and sqlite
only.Source§impl FromSql<Timestamptz, Sqlite> for DateTime<Utc>
Available on crate features chrono
and sqlite
only.
impl FromSql<Timestamptz, Sqlite> for DateTime<Utc>
chrono
and sqlite
only.Source§impl FromSql<Timestamptz, Sqlite> for NaiveDateTime
Available on crate features chrono
and sqlite
only.
impl FromSql<Timestamptz, Sqlite> for NaiveDateTime
chrono
and sqlite
only.Source§impl FromSql<Timestamptz, Sqlite> for OffsetDateTime
Available on crate features time
and sqlite
only.
impl FromSql<Timestamptz, Sqlite> for OffsetDateTime
time
and sqlite
only.Source§impl FromSql<Timestamptz, Sqlite> for PrimitiveDateTime
Available on crate features time
and sqlite
only.
impl FromSql<Timestamptz, Sqlite> for PrimitiveDateTime
time
and sqlite
only.Source§impl FromSql<TinyInt, Mysql> for i8
Available on crate feature mysql_backend
only.
impl FromSql<TinyInt, Mysql> for i8
mysql_backend
only.fn from_sql(value: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Unsigned<BigInt>, Mysql> for u64
Available on crate feature mysql_backend
only.
impl FromSql<Unsigned<BigInt>, Mysql> for u64
mysql_backend
only.fn from_sql(bytes: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Unsigned<Integer>, Mysql> for u32
Available on crate feature mysql_backend
only.
impl FromSql<Unsigned<Integer>, Mysql> for u32
mysql_backend
only.fn from_sql(bytes: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Unsigned<SmallInt>, Mysql> for u16
Available on crate feature mysql_backend
only.
impl FromSql<Unsigned<SmallInt>, Mysql> for u16
mysql_backend
only.fn from_sql(bytes: MysqlValue<'_>) -> Result<Self>
Source§impl FromSql<Unsigned<TinyInt>, Mysql> for u8
Available on crate feature mysql_backend
only.
impl FromSql<Unsigned<TinyInt>, Mysql> for u8
mysql_backend
only.fn from_sql(bytes: MysqlValue<'_>) -> Result<Self>
Source§impl<T0, ST0> FromSql<Record<(ST0,)>, Pg> for (T0,)
Available on crate feature postgres_backend
only.
impl<T0, ST0> FromSql<Record<(ST0,)>, Pg> for (T0,)
postgres_backend
only.Source§impl<T0, T1, ST0, ST1> FromSql<Record<(ST0, ST1)>, Pg> for (T0, T1)
Available on crate feature postgres_backend
only.
impl<T0, T1, ST0, ST1> FromSql<Record<(ST0, ST1)>, Pg> for (T0, T1)
postgres_backend
only.Source§impl<T0, T1, T2, ST0, ST1, ST2> FromSql<Record<(ST0, ST1, ST2)>, Pg> for (T0, T1, T2)
Available on crate feature postgres_backend
only.
impl<T0, T1, T2, ST0, ST1, ST2> FromSql<Record<(ST0, ST1, ST2)>, Pg> for (T0, T1, T2)
postgres_backend
only.Source§impl<T0, T1, T2, T3, ST0, ST1, ST2, ST3> FromSql<Record<(ST0, ST1, ST2, ST3)>, Pg> for (T0, T1, T2, T3)
Available on crate feature postgres_backend
only.
impl<T0, T1, T2, T3, ST0, ST1, ST2, ST3> FromSql<Record<(ST0, ST1, ST2, ST3)>, Pg> for (T0, T1, T2, T3)
postgres_backend
only.Source§impl<T0, T1, T2, T3, T4, ST0, ST1, ST2, ST3, ST4> FromSql<Record<(ST0, ST1, ST2, ST3, ST4)>, Pg> for (T0, T1, T2, T3, T4)
Available on crate feature postgres_backend
only.
impl<T0, T1, T2, T3, T4, ST0, ST1, ST2, ST3, ST4> FromSql<Record<(ST0, ST1, ST2, ST3, ST4)>, Pg> for (T0, T1, T2, T3, T4)
postgres_backend
only.Source§impl<T0, T1, T2, T3, T4, T5, ST0, ST1, ST2, ST3, ST4, ST5> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5)>, Pg> for (T0, T1, T2, T3, T4, T5)
Available on crate feature postgres_backend
only.
impl<T0, T1, T2, T3, T4, T5, ST0, ST1, ST2, ST3, ST4, ST5> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5)>, Pg> for (T0, T1, T2, T3, T4, T5)
postgres_backend
only.Source§impl<T0, T1, T2, T3, T4, T5, T6, ST0, ST1, ST2, ST3, ST4, ST5, ST6> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6)>, Pg> for (T0, T1, T2, T3, T4, T5, T6)
Available on crate feature postgres_backend
only.
impl<T0, T1, T2, T3, T4, T5, T6, ST0, ST1, ST2, ST3, ST4, ST5, ST6> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6)>, Pg> for (T0, T1, T2, T3, T4, T5, T6)
postgres_backend
only.Source§impl<T0, T1, T2, T3, T4, T5, T6, T7, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7)
Available on crate feature postgres_backend
only.
impl<T0, T1, T2, T3, T4, T5, T6, T7, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7)
postgres_backend
only.Source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
Available on crate feature postgres_backend
only.
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
postgres_backend
only.Source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
Available on crate feature postgres_backend
only.
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
postgres_backend
only.Source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
Available on crate feature postgres_backend
only.
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
postgres_backend
only.Source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
Available on crate feature postgres_backend
only.
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
postgres_backend
only.Source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
Available on crate feature postgres_backend
only.
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
postgres_backend
only.Source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)where
T0: FromSql<ST0, Pg>,
T1: FromSql<ST1, Pg>,
T2: FromSql<ST2, Pg>,
T3: FromSql<ST3, Pg>,
T4: FromSql<ST4, Pg>,
T5: FromSql<ST5, Pg>,
T6: FromSql<ST6, Pg>,
T7: FromSql<ST7, Pg>,
T8: FromSql<ST8, Pg>,
T9: FromSql<ST9, Pg>,
T10: FromSql<ST10, Pg>,
T11: FromSql<ST11, Pg>,
T12: FromSql<ST12, Pg>,
T13: FromSql<ST13, Pg>,
Available on crate feature postgres_backend
only.
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)where
T0: FromSql<ST0, Pg>,
T1: FromSql<ST1, Pg>,
T2: FromSql<ST2, Pg>,
T3: FromSql<ST3, Pg>,
T4: FromSql<ST4, Pg>,
T5: FromSql<ST5, Pg>,
T6: FromSql<ST6, Pg>,
T7: FromSql<ST7, Pg>,
T8: FromSql<ST8, Pg>,
T9: FromSql<ST9, Pg>,
T10: FromSql<ST10, Pg>,
T11: FromSql<ST11, Pg>,
T12: FromSql<ST12, Pg>,
T13: FromSql<ST13, Pg>,
postgres_backend
only.Source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)where
T0: FromSql<ST0, Pg>,
T1: FromSql<ST1, Pg>,
T2: FromSql<ST2, Pg>,
T3: FromSql<ST3, Pg>,
T4: FromSql<ST4, Pg>,
T5: FromSql<ST5, Pg>,
T6: FromSql<ST6, Pg>,
T7: FromSql<ST7, Pg>,
T8: FromSql<ST8, Pg>,
T9: FromSql<ST9, Pg>,
T10: FromSql<ST10, Pg>,
T11: FromSql<ST11, Pg>,
T12: FromSql<ST12, Pg>,
T13: FromSql<ST13, Pg>,
T14: FromSql<ST14, Pg>,
Available on crate feature postgres_backend
only.
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)where
T0: FromSql<ST0, Pg>,
T1: FromSql<ST1, Pg>,
T2: FromSql<ST2, Pg>,
T3: FromSql<ST3, Pg>,
T4: FromSql<ST4, Pg>,
T5: FromSql<ST5, Pg>,
T6: FromSql<ST6, Pg>,
T7: FromSql<ST7, Pg>,
T8: FromSql<ST8, Pg>,
T9: FromSql<ST9, Pg>,
T10: FromSql<ST10, Pg>,
T11: FromSql<ST11, Pg>,
T12: FromSql<ST12, Pg>,
T13: FromSql<ST13, Pg>,
T14: FromSql<ST14, Pg>,
postgres_backend
only.Source§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14, ST15> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14, ST15)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)where
T0: FromSql<ST0, Pg>,
T1: FromSql<ST1, Pg>,
T2: FromSql<ST2, Pg>,
T3: FromSql<ST3, Pg>,
T4: FromSql<ST4, Pg>,
T5: FromSql<ST5, Pg>,
T6: FromSql<ST6, Pg>,
T7: FromSql<ST7, Pg>,
T8: FromSql<ST8, Pg>,
T9: FromSql<ST9, Pg>,
T10: FromSql<ST10, Pg>,
T11: FromSql<ST11, Pg>,
T12: FromSql<ST12, Pg>,
T13: FromSql<ST13, Pg>,
T14: FromSql<ST14, Pg>,
T15: FromSql<ST15, Pg>,
Available on crate feature postgres_backend
only.
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14, ST15> FromSql<Record<(ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7, ST8, ST9, ST10, ST11, ST12, ST13, ST14, ST15)>, Pg> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)where
T0: FromSql<ST0, Pg>,
T1: FromSql<ST1, Pg>,
T2: FromSql<ST2, Pg>,
T3: FromSql<ST3, Pg>,
T4: FromSql<ST4, Pg>,
T5: FromSql<ST5, Pg>,
T6: FromSql<ST6, Pg>,
T7: FromSql<ST7, Pg>,
T8: FromSql<ST8, Pg>,
T9: FromSql<ST9, Pg>,
T10: FromSql<ST10, Pg>,
T11: FromSql<ST11, Pg>,
T12: FromSql<ST12, Pg>,
T13: FromSql<ST13, Pg>,
T14: FromSql<ST14, Pg>,
T15: FromSql<ST15, Pg>,
postgres_backend
only.Source§impl<T, ST> FromSql<Array<ST>, Pg> for Vec<T>
Available on crate feature postgres_backend
only.
impl<T, ST> FromSql<Array<ST>, Pg> for Vec<T>
postgres_backend
only.Source§impl<T, ST> FromSql<Range<ST>, Pg> for (Bound<T>, Bound<T>)
Available on crate feature postgres_backend
only.
impl<T, ST> FromSql<Range<ST>, Pg> for (Bound<T>, Bound<T>)
postgres_backend
only.Implementors§
impl FromSql<Date, Mysql> for MysqlTime
mysql_backend
only.impl FromSql<Date, Pg> for PgDate
postgres_backend
only.impl FromSql<Datetime, Mysql> for MysqlTime
mysql_backend
only.impl FromSql<Interval, Pg> for PgInterval
postgres_backend
only.impl FromSql<Money, Pg> for PgMoney
postgres_backend
only.impl FromSql<Numeric, Pg> for PgNumeric
postgres_backend
only.impl FromSql<Time, Mysql> for MysqlTime
mysql_backend
only.impl FromSql<Time, Pg> for PgTime
postgres_backend
only.impl FromSql<Timestamp, Mysql> for MysqlTime
mysql_backend
only.impl FromSql<Timestamp, Pg> for PgTimestamp
postgres_backend
only.impl FromSql<Timestamptz, Pg> for PgTimestamp
postgres_backend
only.