pub trait Decode<'r, DB: Database>: Sized {
// Required method
fn decode(
value: <DB as HasValueRef<'r>>::ValueRef,
) -> Result<Self, BoxDynError>;
}
Expand description
A type that can be decoded from the database.
§How can I implement Decode
?
A manual implementation of Decode
can be useful when adding support for
types externally to SQLx.
The following showcases how to implement Decode
to be generic over Database
. The
implementation can be marginally simpler if you remove the DB
type parameter and explicitly
use the concrete ValueRef
and TypeInfo
types.
struct MyType;
// DB is the database driver
// `'r` is the lifetime of the `Row` being decoded
impl<'r, DB: Database> Decode<'r, DB> for MyType
where
// we want to delegate some of the work to string decoding so let's make sure strings
// are supported by the database
&'r str: Decode<'r, DB>
{
fn decode(
value: <DB as HasValueRef<'r>>::ValueRef,
) -> Result<MyType, Box<dyn Error + 'static + Send + Sync>> {
// the interface of ValueRef is largely unstable at the moment
// so this is not directly implementable
// however, you can delegate to a type that matches the format of the type you want
// to decode (such as a UTF-8 string)
let value = <&str as Decode<DB>>::decode(value)?;
// now you can parse this into your type (assuming there is a `FromStr`)
Ok(value.parse()?)
}
}
Required Methods§
Sourcefn decode(value: <DB as HasValueRef<'r>>::ValueRef) -> Result<Self, BoxDynError>
fn decode(value: <DB as HasValueRef<'r>>::ValueRef) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
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 Decode<'_, Mssql> for bool
Available on crate feature mssql
only.
impl Decode<'_, Mssql> for bool
mssql
only.fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for f32
Available on crate feature mssql
only.
impl Decode<'_, Mssql> for f32
mssql
only.fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for f64
Available on crate feature mssql
only.
impl Decode<'_, Mssql> for f64
mssql
only.fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for i8
Available on crate feature mssql
only.
impl Decode<'_, Mssql> for i8
mssql
only.fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for i16
Available on crate feature mssql
only.
impl Decode<'_, Mssql> for i16
mssql
only.fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for i32
Available on crate feature mssql
only.
impl Decode<'_, Mssql> for i32
mssql
only.fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for i64
Available on crate feature mssql
only.
impl Decode<'_, Mssql> for i64
mssql
only.fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for u8
Available on crate feature mssql
only.
impl Decode<'_, Mssql> for u8
mssql
only.fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for u16
Available on crate feature mssql
only.
impl Decode<'_, Mssql> for u16
mssql
only.fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for u32
Available on crate feature mssql
only.
impl Decode<'_, Mssql> for u32
mssql
only.fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for u64
Available on crate feature mssql
only.
impl Decode<'_, Mssql> for u64
mssql
only.fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for String
Available on crate feature mssql
only.
impl Decode<'_, Mssql> for String
mssql
only.fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for Vec<u8>
Available on crate feature mssql
only.
impl Decode<'_, Mssql> for Vec<u8>
mssql
only.fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for BigDecimal
Available on crate feature mssql
only.
impl Decode<'_, Mssql> for BigDecimal
mssql
only.fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for DateTime<FixedOffset>
Available on crate feature mssql
only.
impl Decode<'_, Mssql> for DateTime<FixedOffset>
mssql
only.fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for DateTime<Utc>
Available on crate feature mssql
only.
impl Decode<'_, Mssql> for DateTime<Utc>
mssql
only.fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for NaiveDate
Available on crate feature mssql
only.Decodes Date values received from the server
impl Decode<'_, Mssql> for NaiveDate
mssql
only.Decodes Date values received from the server
fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for NaiveDateTime
Available on crate feature mssql
only.Decodes DateTime2N values received from the server
impl Decode<'_, Mssql> for NaiveDateTime
mssql
only.Decodes DateTime2N values received from the server
fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for NaiveTime
Available on crate feature mssql
only.Decodes Time values received from the server
impl Decode<'_, Mssql> for NaiveTime
mssql
only.Decodes Time values received from the server
fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Mssql> for Decimal
Available on crate feature mssql
only.
impl Decode<'_, Mssql> for Decimal
mssql
only.fn decode(value: MssqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, MySql> for bool
Available on crate feature mysql
only.
impl Decode<'_, MySql> for bool
mysql
only.fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, MySql> for f32
Available on crate feature mysql
only.
impl Decode<'_, MySql> for f32
mysql
only.fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, MySql> for f64
Available on crate feature mysql
only.
impl Decode<'_, MySql> for f64
mysql
only.fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, MySql> for i8
Available on crate feature mysql
only.
impl Decode<'_, MySql> for i8
mysql
only.fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, MySql> for i16
Available on crate feature mysql
only.
impl Decode<'_, MySql> for i16
mysql
only.fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, MySql> for i32
Available on crate feature mysql
only.
impl Decode<'_, MySql> for i32
mysql
only.fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, MySql> for i64
Available on crate feature mysql
only.
impl Decode<'_, MySql> for i64
mysql
only.fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, MySql> for u8
Available on crate feature mysql
only.
impl Decode<'_, MySql> for u8
mysql
only.fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, MySql> for u16
Available on crate feature mysql
only.
impl Decode<'_, MySql> for u16
mysql
only.fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, MySql> for u32
Available on crate feature mysql
only.
impl Decode<'_, MySql> for u32
mysql
only.fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, MySql> for u64
Available on crate feature mysql
only.
impl Decode<'_, MySql> for u64
mysql
only.fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, MySql> for String
Available on crate feature mysql
only.
impl Decode<'_, MySql> for String
mysql
only.fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, MySql> for Vec<u8>
Available on crate feature mysql
only.
impl Decode<'_, MySql> for Vec<u8>
mysql
only.fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, MySql> for BigDecimal
Available on crate feature mysql
only.
impl Decode<'_, MySql> for BigDecimal
mysql
only.fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, MySql> for Decimal
Available on crate feature mysql
only.
impl Decode<'_, MySql> for Decimal
mysql
only.fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, MySql> for Hyphenated
Available on crate feature mysql
only.
impl Decode<'_, MySql> for Hyphenated
mysql
only.fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, MySql> for Uuid
Available on crate feature mysql
only.
impl Decode<'_, MySql> for Uuid
mysql
only.fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Postgres> for IpNetwork
Available on crate feature postgres
only.
impl Decode<'_, Postgres> for IpNetwork
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Postgres> for bool
Available on crate feature postgres
only.
impl Decode<'_, Postgres> for bool
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Postgres> for f32
Available on crate feature postgres
only.
impl Decode<'_, Postgres> for f32
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Postgres> for f64
Available on crate feature postgres
only.
impl Decode<'_, Postgres> for f64
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Postgres> for i8
Available on crate feature postgres
only.
impl Decode<'_, Postgres> for i8
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Postgres> for i16
Available on crate feature postgres
only.
impl Decode<'_, Postgres> for i16
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Postgres> for i32
Available on crate feature postgres
only.
impl Decode<'_, Postgres> for i32
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Postgres> for i64
Available on crate feature postgres
only.
impl Decode<'_, Postgres> for i64
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Postgres> for u16
Available on crate feature postgres
only.
impl Decode<'_, Postgres> for u16
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Postgres> for u32
Available on crate feature postgres
only.
impl Decode<'_, Postgres> for u32
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Postgres> for u64
Available on crate feature postgres
only.
impl Decode<'_, Postgres> for u64
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Postgres> for String
Available on crate feature postgres
only.
impl Decode<'_, Postgres> for String
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Postgres> for Vec<u8>
Available on crate feature postgres
only.
impl Decode<'_, Postgres> for Vec<u8>
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Postgres> for BigDecimal
Available on crate feature postgres
only.
impl Decode<'_, Postgres> for BigDecimal
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Postgres> for BitVec
Available on crate feature postgres
only.
impl Decode<'_, Postgres> for BitVec
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Postgres> for MacAddress
Available on crate feature postgres
only.
impl Decode<'_, Postgres> for MacAddress
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Postgres> for Decimal
Available on crate feature postgres
only.
impl Decode<'_, Postgres> for Decimal
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Postgres> for Uuid
Available on crate feature postgres
only.
impl Decode<'_, Postgres> for Uuid
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Sqlite> for BigDecimal
Available on crate feature sqlite
only.
impl Decode<'_, Sqlite> for BigDecimal
sqlite
only.fn decode(value: SqliteValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Sqlite> for Decimal
Available on crate feature sqlite
only.
impl Decode<'_, Sqlite> for Decimal
sqlite
only.fn decode(value: SqliteValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Sqlite> for Hyphenated
Available on crate feature sqlite
only.
impl Decode<'_, Sqlite> for Hyphenated
sqlite
only.fn decode(value: SqliteValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl Decode<'_, Sqlite> for Uuid
Available on crate feature sqlite
only.
impl Decode<'_, Sqlite> for Uuid
sqlite
only.fn decode(value: SqliteValueRef<'_>) -> Result<Self, BoxDynError>
Source§impl<'db> Decode<'db, Postgres> for IpAddr
Available on crate feature postgres
only.
impl<'db> Decode<'db, Postgres> for IpAddr
postgres
only.fn decode(value: PgValueRef<'db>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for &'r str
impl<'r> Decode<'r, Any> for &'r str
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for &'r [u8]
impl<'r> Decode<'r, Any> for &'r [u8]
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for bool
impl<'r> Decode<'r, Any> for bool
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for f32
impl<'r> Decode<'r, Any> for f32
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for f64
impl<'r> Decode<'r, Any> for f64
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for i16
impl<'r> Decode<'r, Any> for i16
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for i32
impl<'r> Decode<'r, Any> for i32
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for i64
impl<'r> Decode<'r, Any> for i64
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for u16
impl<'r> Decode<'r, Any> for u16
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for u32
impl<'r> Decode<'r, Any> for u32
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for u64
impl<'r> Decode<'r, Any> for u64
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for String
impl<'r> Decode<'r, Any> for String
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for Vec<u8>
impl<'r> Decode<'r, Any> for Vec<u8>
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for BigDecimalwhere
BigDecimal: AnyDecode<'r>,
impl<'r> Decode<'r, Any> for BigDecimalwhere
BigDecimal: AnyDecode<'r>,
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for DateTime<FixedOffset>
impl<'r> Decode<'r, Any> for DateTime<FixedOffset>
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for DateTime<Local>
impl<'r> Decode<'r, Any> for DateTime<Local>
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for DateTime<Utc>
impl<'r> Decode<'r, Any> for DateTime<Utc>
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for NaiveDate
impl<'r> Decode<'r, Any> for NaiveDate
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for NaiveDateTimewhere
NaiveDateTime: AnyDecode<'r>,
impl<'r> Decode<'r, Any> for NaiveDateTimewhere
NaiveDateTime: AnyDecode<'r>,
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for NaiveTime
impl<'r> Decode<'r, Any> for NaiveTime
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Any> for Decimal
impl<'r> Decode<'r, Any> for Decimal
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Mssql> for &'r [u8]
Available on crate feature mssql
only.
impl<'r> Decode<'r, Mssql> for &'r [u8]
mssql
only.fn decode(value: MssqlValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Mssql> for Cow<'r, str>
Available on crate feature mssql
only.
impl<'r> Decode<'r, Mssql> for Cow<'r, str>
mssql
only.fn decode(value: MssqlValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Mssql> for Cow<'r, [u8]>
Available on crate feature mssql
only.
impl<'r> Decode<'r, Mssql> for Cow<'r, [u8]>
mssql
only.fn decode(value: MssqlValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, MySql> for &'r str
Available on crate feature mysql
only.
impl<'r> Decode<'r, MySql> for &'r str
mysql
only.fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, MySql> for &'r [u8]
Available on crate feature mysql
only.
impl<'r> Decode<'r, MySql> for &'r [u8]
mysql
only.fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, MySql> for Cow<'r, str>
Available on crate feature mysql
only.
impl<'r> Decode<'r, MySql> for Cow<'r, str>
mysql
only.fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, MySql> for DateTime<FixedOffset>
Available on crate feature mysql
only.Note: assumes the connection’s time_zone
is set to +00:00
(UTC).
impl<'r> Decode<'r, MySql> for DateTime<FixedOffset>
mysql
only.Note: assumes the connection’s time_zone
is set to +00:00
(UTC).
fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, MySql> for DateTime<Local>
Available on crate feature mysql
only.Note: assumes the connection’s time_zone
is set to +00:00
(UTC).
impl<'r> Decode<'r, MySql> for DateTime<Local>
mysql
only.Note: assumes the connection’s time_zone
is set to +00:00
(UTC).
fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, MySql> for DateTime<Utc>
Available on crate feature mysql
only.Note: assumes the connection’s time_zone
is set to +00:00
(UTC).
impl<'r> Decode<'r, MySql> for DateTime<Utc>
mysql
only.Note: assumes the connection’s time_zone
is set to +00:00
(UTC).
fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, MySql> for NaiveDate
Available on crate feature mysql
only.
impl<'r> Decode<'r, MySql> for NaiveDate
mysql
only.fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, MySql> for NaiveDateTime
Available on crate feature mysql
only.
impl<'r> Decode<'r, MySql> for NaiveDateTime
mysql
only.fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, MySql> for NaiveTime
Available on crate feature mysql
only.
impl<'r> Decode<'r, MySql> for NaiveTime
mysql
only.fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, MySql> for Date
Available on crate feature mysql
only.
impl<'r> Decode<'r, MySql> for Date
mysql
only.fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, MySql> for OffsetDateTime
Available on crate feature mysql
only.
impl<'r> Decode<'r, MySql> for OffsetDateTime
mysql
only.fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, MySql> for PrimitiveDateTime
Available on crate feature mysql
only.
impl<'r> Decode<'r, MySql> for PrimitiveDateTime
mysql
only.fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, MySql> for Time
Available on crate feature mysql
only.
impl<'r> Decode<'r, MySql> for Time
mysql
only.fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Postgres> for &'r str
Available on crate feature postgres
only.
impl<'r> Decode<'r, Postgres> for &'r str
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Postgres> for &'r [u8]
Available on crate feature postgres
only.
impl<'r> Decode<'r, Postgres> for &'r [u8]
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Postgres> for Cow<'r, str>
Available on crate feature postgres
only.
impl<'r> Decode<'r, Postgres> for Cow<'r, str>
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Postgres> for ()
Available on crate feature postgres
only.
impl<'r> Decode<'r, Postgres> for ()
postgres
only.fn decode(_value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Postgres> for DateTime<FixedOffset>
Available on crate feature postgres
only.
impl<'r> Decode<'r, Postgres> for DateTime<FixedOffset>
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Postgres> for DateTime<Local>
Available on crate feature postgres
only.
impl<'r> Decode<'r, Postgres> for DateTime<Local>
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Postgres> for DateTime<Utc>
Available on crate feature postgres
only.
impl<'r> Decode<'r, Postgres> for DateTime<Utc>
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Postgres> for NaiveDate
Available on crate feature postgres
only.
impl<'r> Decode<'r, Postgres> for NaiveDate
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Postgres> for NaiveDateTime
Available on crate feature postgres
only.
impl<'r> Decode<'r, Postgres> for NaiveDateTime
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Postgres> for NaiveTime
Available on crate feature postgres
only.
impl<'r> Decode<'r, Postgres> for NaiveTime
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Postgres> for Date
Available on crate feature postgres
only.
impl<'r> Decode<'r, Postgres> for Date
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Postgres> for OffsetDateTime
Available on crate feature postgres
only.
impl<'r> Decode<'r, Postgres> for OffsetDateTime
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Postgres> for PrimitiveDateTime
Available on crate feature postgres
only.
impl<'r> Decode<'r, Postgres> for PrimitiveDateTime
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Postgres> for Time
Available on crate feature postgres
only.
impl<'r> Decode<'r, Postgres> for Time
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for &'r str
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for &'r str
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for &'r [u8]
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for &'r [u8]
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for Cow<'r, str>
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for Cow<'r, str>
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for bool
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for bool
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<bool, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for f32
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for f32
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<f32, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for f64
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for f64
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<f64, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for i8
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for i8
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for i16
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for i16
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for i32
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for i32
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for i64
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for i64
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for u8
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for u8
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for u16
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for u16
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for u32
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for u32
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for u64
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for u64
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for String
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for String
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for Vec<u8>
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for Vec<u8>
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for DateTime<FixedOffset>
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for DateTime<FixedOffset>
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for DateTime<Local>
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for DateTime<Local>
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for DateTime<Utc>
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for DateTime<Utc>
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for NaiveDate
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for NaiveDate
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for NaiveDateTime
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for NaiveDateTime
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for NaiveTime
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for NaiveTime
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for Date
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for Date
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for OffsetDateTime
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for OffsetDateTime
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for PrimitiveDateTime
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for PrimitiveDateTime
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r> Decode<'r, Sqlite> for Time
Available on crate feature sqlite
only.
impl<'r> Decode<'r, Sqlite> for Time
sqlite
only.fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r, DB, T> Decode<'r, DB> for Option<T>
impl<'r, DB, T> Decode<'r, DB> for Option<T>
fn decode(value: <DB as HasValueRef<'r>>::ValueRef) -> Result<Self, BoxDynError>
Source§impl<'r, T1> Decode<'r, Postgres> for (T1,)
Available on crate feature postgres
only.
impl<'r, T1> Decode<'r, Postgres> for (T1,)
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r, T1, T2> Decode<'r, Postgres> for (T1, T2)
Available on crate feature postgres
only.
impl<'r, T1, T2> Decode<'r, Postgres> for (T1, T2)
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r, T1, T2, T3> Decode<'r, Postgres> for (T1, T2, T3)
Available on crate feature postgres
only.
impl<'r, T1, T2, T3> Decode<'r, Postgres> for (T1, T2, T3)
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r, T1, T2, T3, T4> Decode<'r, Postgres> for (T1, T2, T3, T4)
Available on crate feature postgres
only.
impl<'r, T1, T2, T3, T4> Decode<'r, Postgres> for (T1, T2, T3, T4)
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r, T1, T2, T3, T4, T5> Decode<'r, Postgres> for (T1, T2, T3, T4, T5)
Available on crate feature postgres
only.
impl<'r, T1, T2, T3, T4, T5> Decode<'r, Postgres> for (T1, T2, T3, T4, T5)
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r, T1, T2, T3, T4, T5, T6> Decode<'r, Postgres> for (T1, T2, T3, T4, T5, T6)where
T1: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T2: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T3: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T4: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T5: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T6: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
Available on crate feature postgres
only.
impl<'r, T1, T2, T3, T4, T5, T6> Decode<'r, Postgres> for (T1, T2, T3, T4, T5, T6)where
T1: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T2: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T3: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T4: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T5: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T6: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r, T1, T2, T3, T4, T5, T6, T7> Decode<'r, Postgres> for (T1, T2, T3, T4, T5, T6, T7)where
T1: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T2: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T3: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T4: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T5: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T6: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T7: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
Available on crate feature postgres
only.
impl<'r, T1, T2, T3, T4, T5, T6, T7> Decode<'r, Postgres> for (T1, T2, T3, T4, T5, T6, T7)where
T1: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T2: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T3: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T4: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T5: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T6: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T7: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r, T1, T2, T3, T4, T5, T6, T7, T8> Decode<'r, Postgres> for (T1, T2, T3, T4, T5, T6, T7, T8)where
T1: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T2: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T3: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T4: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T5: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T6: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T7: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T8: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
Available on crate feature postgres
only.
impl<'r, T1, T2, T3, T4, T5, T6, T7, T8> Decode<'r, Postgres> for (T1, T2, T3, T4, T5, T6, T7, T8)where
T1: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T2: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T3: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T4: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T5: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T6: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T7: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T8: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r, T1, T2, T3, T4, T5, T6, T7, T8, T9> Decode<'r, Postgres> for (T1, T2, T3, T4, T5, T6, T7, T8, T9)where
T1: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T2: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T3: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T4: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T5: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T6: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T7: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T8: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T9: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
Available on crate feature postgres
only.
impl<'r, T1, T2, T3, T4, T5, T6, T7, T8, T9> Decode<'r, Postgres> for (T1, T2, T3, T4, T5, T6, T7, T8, T9)where
T1: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T2: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T3: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T4: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T5: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T6: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T7: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T8: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
T9: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r, T> Decode<'r, Postgres> for Vec<T>
Available on crate feature postgres
only.
impl<'r, T> Decode<'r, Postgres> for Vec<T>
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<'r, T, const N: usize> Decode<'r, Postgres> for [T; N]
Available on crate feature postgres
only.
impl<'r, T, const N: usize> Decode<'r, Postgres> for [T; N]
postgres
only.fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Source§impl<const N: usize> Decode<'_, Postgres> for [u8; N]
Available on crate feature postgres
only.
impl<const N: usize> Decode<'_, Postgres> for [u8; N]
postgres
only.fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
Implementors§
impl Decode<'_, Postgres> for Oid
postgres
only.impl Decode<'_, Postgres> for PgMoney
postgres
only.impl<'de> Decode<'de, Postgres> for PgInterval
postgres
only.impl<'r> Decode<'r, Any> for Value
impl<'r> Decode<'r, Postgres> for PgLQuery
postgres
only.impl<'r> Decode<'r, Postgres> for PgLTree
postgres
only.impl<'r> Decode<'r, Postgres> for PgTimeTz<NaiveTime, FixedOffset>
postgres
only.impl<'r> Decode<'r, Postgres> for PgTimeTz<Time, UtcOffset>
postgres
only.impl<'r, DB> Decode<'r, DB> for &'r JsonRawValue
json
only.impl<'r, DB> Decode<'r, DB> for JsonValue
json
only.impl<'r, T> Decode<'r, Mssql> for Json<T>where
T: Deserialize<'r> + 'r,
mssql
only.impl<'r, T> Decode<'r, MySql> for Json<T>where
T: 'r + Deserialize<'r>,
mysql
only.impl<'r, T> Decode<'r, Postgres> for PgRange<T>
postgres
only.impl<'r, T> Decode<'r, Postgres> for Json<T>where
T: Deserialize<'r> + 'r,
postgres
only.impl<'r, T> Decode<'r, Sqlite> for Json<T>where
T: 'r + Deserialize<'r>,
sqlite
only.