pub trait Decode<'r, DB: Database>: Sized {
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
fn 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.
Implementations on Foreign Types
sourceimpl<'r, DB, T> Decode<'r, DB> for Option<T> where
DB: Database,
T: Decode<'r, DB>,
impl<'r, DB, T> Decode<'r, DB> for Option<T> where
DB: Database,
T: Decode<'r, DB>,
fn decode(value: <DB as HasValueRef<'r>>::ValueRef) -> Result<Self, BoxDynError>
sourceimpl<'r, DB> Decode<'r, DB> for JsonValue where
Json<Self>: Decode<'r, DB>,
DB: Database,
impl<'r, DB> Decode<'r, DB> for JsonValue where
Json<Self>: Decode<'r, DB>,
DB: Database,
fn decode(value: <DB as HasValueRef<'r>>::ValueRef) -> Result<Self, BoxDynError>
sourceimpl<'r, DB> Decode<'r, DB> for &'r JsonRawValue where
Json<Self>: Decode<'r, DB>,
DB: Database,
impl<'r, DB> Decode<'r, DB> for &'r JsonRawValue where
Json<Self>: Decode<'r, DB>,
DB: Database,
fn decode(value: <DB as HasValueRef<'r>>::ValueRef) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Any> for bool where
bool: AnyDecode<'r>,
impl<'r> Decode<'r, Any> for bool where
bool: AnyDecode<'r>,
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Any> for i32 where
i32: AnyDecode<'r>,
impl<'r> Decode<'r, Any> for i32 where
i32: AnyDecode<'r>,
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Any> for i64 where
i64: AnyDecode<'r>,
impl<'r> Decode<'r, Any> for i64 where
i64: AnyDecode<'r>,
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Any> for f32 where
f32: AnyDecode<'r>,
impl<'r> Decode<'r, Any> for f32 where
f32: AnyDecode<'r>,
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Any> for f64 where
f64: AnyDecode<'r>,
impl<'r> Decode<'r, Any> for f64 where
f64: AnyDecode<'r>,
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Any> for &'r str where
&'r str: AnyDecode<'r>,
impl<'r> Decode<'r, Any> for &'r str where
&'r str: AnyDecode<'r>,
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Any> for String where
String: AnyDecode<'r>,
impl<'r> Decode<'r, Any> for String where
String: AnyDecode<'r>,
fn decode(value: AnyValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r, T> Decode<'r, Postgres> for Vec<T> where
T: for<'a> Decode<'a, Postgres> + Type<Postgres>,
impl<'r, T> Decode<'r, Postgres> for Vec<T> where
T: for<'a> Decode<'a, Postgres> + Type<Postgres>,
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, Postgres> for bool
impl Decode<'_, Postgres> for bool
fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Postgres> for &'r [u8]
impl<'r> Decode<'r, Postgres> for &'r [u8]
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, Postgres> for Vec<u8>
impl Decode<'_, Postgres> for Vec<u8>
fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, Postgres> for f32
impl Decode<'_, Postgres> for f32
fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, Postgres> for f64
impl Decode<'_, Postgres> for f64
fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, Postgres> for i8
impl Decode<'_, Postgres> for i8
fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, Postgres> for i16
impl Decode<'_, Postgres> for i16
fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, Postgres> for u32
impl Decode<'_, Postgres> for u32
fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, Postgres> for i32
impl Decode<'_, Postgres> for i32
fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, Postgres> for i64
impl Decode<'_, Postgres> for i64
fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Postgres> for &'r str
impl<'r> Decode<'r, Postgres> for &'r str
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Postgres> for Cow<'r, str>
impl<'r> Decode<'r, Postgres> for Cow<'r, str>
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, Postgres> for String
impl Decode<'_, Postgres> for String
fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl<'r, T1> Decode<'r, Postgres> for (T1,) where
T1: 'r,
T1: Type<Postgres>,
T1: for<'a> Decode<'a, Postgres>,
impl<'r, T1> Decode<'r, Postgres> for (T1,) where
T1: 'r,
T1: Type<Postgres>,
T1: for<'a> Decode<'a, Postgres>,
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r, T1, T2> Decode<'r, Postgres> for (T1, T2) where
T1: 'r,
T2: 'r,
T1: Type<Postgres>,
T2: Type<Postgres>,
T1: for<'a> Decode<'a, Postgres>,
T2: for<'a> Decode<'a, Postgres>,
impl<'r, T1, T2> Decode<'r, Postgres> for (T1, T2) where
T1: 'r,
T2: 'r,
T1: Type<Postgres>,
T2: Type<Postgres>,
T1: for<'a> Decode<'a, Postgres>,
T2: for<'a> Decode<'a, Postgres>,
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r, T1, T2, T3> Decode<'r, Postgres> for (T1, T2, T3) where
T1: 'r,
T2: 'r,
T3: 'r,
T1: Type<Postgres>,
T2: Type<Postgres>,
T3: Type<Postgres>,
T1: for<'a> Decode<'a, Postgres>,
T2: for<'a> Decode<'a, Postgres>,
T3: for<'a> Decode<'a, Postgres>,
impl<'r, T1, T2, T3> Decode<'r, Postgres> for (T1, T2, T3) where
T1: 'r,
T2: 'r,
T3: 'r,
T1: Type<Postgres>,
T2: Type<Postgres>,
T3: Type<Postgres>,
T1: for<'a> Decode<'a, Postgres>,
T2: for<'a> Decode<'a, Postgres>,
T3: for<'a> Decode<'a, Postgres>,
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r, T1, T2, T3, T4> Decode<'r, Postgres> for (T1, T2, T3, T4) where
T1: 'r,
T2: 'r,
T3: 'r,
T4: 'r,
T1: Type<Postgres>,
T2: Type<Postgres>,
T3: Type<Postgres>,
T4: Type<Postgres>,
T1: for<'a> Decode<'a, Postgres>,
T2: for<'a> Decode<'a, Postgres>,
T3: for<'a> Decode<'a, Postgres>,
T4: for<'a> Decode<'a, Postgres>,
impl<'r, T1, T2, T3, T4> Decode<'r, Postgres> for (T1, T2, T3, T4) where
T1: 'r,
T2: 'r,
T3: 'r,
T4: 'r,
T1: Type<Postgres>,
T2: Type<Postgres>,
T3: Type<Postgres>,
T4: Type<Postgres>,
T1: for<'a> Decode<'a, Postgres>,
T2: for<'a> Decode<'a, Postgres>,
T3: for<'a> Decode<'a, Postgres>,
T4: for<'a> Decode<'a, Postgres>,
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r, T1, T2, T3, T4, T5> Decode<'r, Postgres> for (T1, T2, T3, T4, T5) where
T1: 'r,
T2: 'r,
T3: 'r,
T4: 'r,
T5: 'r,
T1: Type<Postgres>,
T2: Type<Postgres>,
T3: Type<Postgres>,
T4: Type<Postgres>,
T5: Type<Postgres>,
T1: for<'a> Decode<'a, Postgres>,
T2: for<'a> Decode<'a, Postgres>,
T3: for<'a> Decode<'a, Postgres>,
T4: for<'a> Decode<'a, Postgres>,
T5: for<'a> Decode<'a, Postgres>,
impl<'r, T1, T2, T3, T4, T5> Decode<'r, Postgres> for (T1, T2, T3, T4, T5) where
T1: 'r,
T2: 'r,
T3: 'r,
T4: 'r,
T5: 'r,
T1: Type<Postgres>,
T2: Type<Postgres>,
T3: Type<Postgres>,
T4: Type<Postgres>,
T5: Type<Postgres>,
T1: for<'a> Decode<'a, Postgres>,
T2: for<'a> Decode<'a, Postgres>,
T3: for<'a> Decode<'a, Postgres>,
T4: for<'a> Decode<'a, Postgres>,
T5: for<'a> Decode<'a, Postgres>,
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r, T1, T2, T3, T4, T5, T6> Decode<'r, Postgres> for (T1, T2, T3, T4, T5, T6) where
T1: 'r,
T2: 'r,
T3: 'r,
T4: 'r,
T5: 'r,
T6: 'r,
T1: Type<Postgres>,
T2: Type<Postgres>,
T3: Type<Postgres>,
T4: Type<Postgres>,
T5: Type<Postgres>,
T6: Type<Postgres>,
T1: for<'a> Decode<'a, Postgres>,
T2: for<'a> Decode<'a, Postgres>,
T3: for<'a> Decode<'a, Postgres>,
T4: for<'a> Decode<'a, Postgres>,
T5: for<'a> Decode<'a, Postgres>,
T6: for<'a> Decode<'a, Postgres>,
impl<'r, T1, T2, T3, T4, T5, T6> Decode<'r, Postgres> for (T1, T2, T3, T4, T5, T6) where
T1: 'r,
T2: 'r,
T3: 'r,
T4: 'r,
T5: 'r,
T6: 'r,
T1: Type<Postgres>,
T2: Type<Postgres>,
T3: Type<Postgres>,
T4: Type<Postgres>,
T5: Type<Postgres>,
T6: Type<Postgres>,
T1: for<'a> Decode<'a, Postgres>,
T2: for<'a> Decode<'a, Postgres>,
T3: for<'a> Decode<'a, Postgres>,
T4: for<'a> Decode<'a, Postgres>,
T5: for<'a> Decode<'a, Postgres>,
T6: for<'a> Decode<'a, Postgres>,
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r, T1, T2, T3, T4, T5, T6, T7> Decode<'r, Postgres> for (T1, T2, T3, T4, T5, T6, T7) where
T1: 'r,
T2: 'r,
T3: 'r,
T4: 'r,
T5: 'r,
T6: 'r,
T7: 'r,
T1: Type<Postgres>,
T2: Type<Postgres>,
T3: Type<Postgres>,
T4: Type<Postgres>,
T5: Type<Postgres>,
T6: Type<Postgres>,
T7: Type<Postgres>,
T1: for<'a> Decode<'a, Postgres>,
T2: for<'a> Decode<'a, Postgres>,
T3: for<'a> Decode<'a, Postgres>,
T4: for<'a> Decode<'a, Postgres>,
T5: for<'a> Decode<'a, Postgres>,
T6: for<'a> Decode<'a, Postgres>,
T7: for<'a> Decode<'a, Postgres>,
impl<'r, T1, T2, T3, T4, T5, T6, T7> Decode<'r, Postgres> for (T1, T2, T3, T4, T5, T6, T7) where
T1: 'r,
T2: 'r,
T3: 'r,
T4: 'r,
T5: 'r,
T6: 'r,
T7: 'r,
T1: Type<Postgres>,
T2: Type<Postgres>,
T3: Type<Postgres>,
T4: Type<Postgres>,
T5: Type<Postgres>,
T6: Type<Postgres>,
T7: Type<Postgres>,
T1: for<'a> Decode<'a, Postgres>,
T2: for<'a> Decode<'a, Postgres>,
T3: for<'a> Decode<'a, Postgres>,
T4: for<'a> Decode<'a, Postgres>,
T5: for<'a> Decode<'a, Postgres>,
T6: for<'a> Decode<'a, Postgres>,
T7: for<'a> Decode<'a, Postgres>,
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r, T1, T2, T3, T4, T5, T6, T7, T8> Decode<'r, Postgres> for (T1, T2, T3, T4, T5, T6, T7, T8) where
T1: 'r,
T2: 'r,
T3: 'r,
T4: 'r,
T5: 'r,
T6: 'r,
T7: 'r,
T8: 'r,
T1: Type<Postgres>,
T2: Type<Postgres>,
T3: Type<Postgres>,
T4: Type<Postgres>,
T5: Type<Postgres>,
T6: Type<Postgres>,
T7: Type<Postgres>,
T8: Type<Postgres>,
T1: for<'a> Decode<'a, Postgres>,
T2: for<'a> Decode<'a, Postgres>,
T3: for<'a> Decode<'a, Postgres>,
T4: for<'a> Decode<'a, Postgres>,
T5: for<'a> Decode<'a, Postgres>,
T6: for<'a> Decode<'a, Postgres>,
T7: for<'a> Decode<'a, Postgres>,
T8: for<'a> Decode<'a, Postgres>,
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,
T2: 'r,
T3: 'r,
T4: 'r,
T5: 'r,
T6: 'r,
T7: 'r,
T8: 'r,
T1: Type<Postgres>,
T2: Type<Postgres>,
T3: Type<Postgres>,
T4: Type<Postgres>,
T5: Type<Postgres>,
T6: Type<Postgres>,
T7: Type<Postgres>,
T8: Type<Postgres>,
T1: for<'a> Decode<'a, Postgres>,
T2: for<'a> Decode<'a, Postgres>,
T3: for<'a> Decode<'a, Postgres>,
T4: for<'a> Decode<'a, Postgres>,
T5: for<'a> Decode<'a, Postgres>,
T6: for<'a> Decode<'a, Postgres>,
T7: for<'a> Decode<'a, Postgres>,
T8: for<'a> Decode<'a, Postgres>,
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'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,
T2: 'r,
T3: 'r,
T4: 'r,
T5: 'r,
T6: 'r,
T7: 'r,
T8: 'r,
T9: 'r,
T1: Type<Postgres>,
T2: Type<Postgres>,
T3: Type<Postgres>,
T4: Type<Postgres>,
T5: Type<Postgres>,
T6: Type<Postgres>,
T7: Type<Postgres>,
T8: Type<Postgres>,
T9: Type<Postgres>,
T1: for<'a> Decode<'a, Postgres>,
T2: for<'a> Decode<'a, Postgres>,
T3: for<'a> Decode<'a, Postgres>,
T4: for<'a> Decode<'a, Postgres>,
T5: for<'a> Decode<'a, Postgres>,
T6: for<'a> Decode<'a, Postgres>,
T7: for<'a> Decode<'a, Postgres>,
T8: for<'a> Decode<'a, Postgres>,
T9: for<'a> Decode<'a, Postgres>,
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,
T2: 'r,
T3: 'r,
T4: 'r,
T5: 'r,
T6: 'r,
T7: 'r,
T8: 'r,
T9: 'r,
T1: Type<Postgres>,
T2: Type<Postgres>,
T3: Type<Postgres>,
T4: Type<Postgres>,
T5: Type<Postgres>,
T6: Type<Postgres>,
T7: Type<Postgres>,
T8: Type<Postgres>,
T9: Type<Postgres>,
T1: for<'a> Decode<'a, Postgres>,
T2: for<'a> Decode<'a, Postgres>,
T3: for<'a> Decode<'a, Postgres>,
T4: for<'a> Decode<'a, Postgres>,
T5: for<'a> Decode<'a, Postgres>,
T6: for<'a> Decode<'a, Postgres>,
T7: for<'a> Decode<'a, Postgres>,
T8: for<'a> Decode<'a, Postgres>,
T9: for<'a> Decode<'a, Postgres>,
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Postgres> for ()
impl<'r> Decode<'r, Postgres> for ()
fn decode(_value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, Postgres> for BigDecimal
impl Decode<'_, Postgres> for BigDecimal
fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, Postgres> for Decimal
impl Decode<'_, Postgres> for Decimal
fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Postgres> for NaiveDate
impl<'r> Decode<'r, Postgres> for NaiveDate
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Postgres> for NaiveDateTime
impl<'r> Decode<'r, Postgres> for NaiveDateTime
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Postgres> for DateTime<Local>
impl<'r> Decode<'r, Postgres> for DateTime<Local>
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Postgres> for DateTime<Utc>
impl<'r> Decode<'r, Postgres> for DateTime<Utc>
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Postgres> for DateTime<FixedOffset>
impl<'r> Decode<'r, Postgres> for DateTime<FixedOffset>
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Postgres> for NaiveTime
impl<'r> Decode<'r, Postgres> for NaiveTime
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Postgres> for Date
impl<'r> Decode<'r, Postgres> for Date
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Postgres> for PrimitiveDateTime
impl<'r> Decode<'r, Postgres> for PrimitiveDateTime
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Postgres> for OffsetDateTime
impl<'r> Decode<'r, Postgres> for OffsetDateTime
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Postgres> for Time
impl<'r> Decode<'r, Postgres> for Time
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, Postgres> for Uuid
impl Decode<'_, Postgres> for Uuid
fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, Postgres> for IpNetwork
impl Decode<'_, Postgres> for IpNetwork
fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, Postgres> for MacAddress
impl Decode<'_, Postgres> for MacAddress
fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, Postgres> for BitVec
impl Decode<'_, Postgres> for BitVec
fn decode(value: PgValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for bool
impl<'r> Decode<'r, Sqlite> for bool
fn decode(value: SqliteValueRef<'r>) -> Result<bool, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for &'r [u8]
impl<'r> Decode<'r, Sqlite> for &'r [u8]
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for Vec<u8>
impl<'r> Decode<'r, Sqlite> for Vec<u8>
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for DateTime<Utc>
impl<'r> Decode<'r, Sqlite> for DateTime<Utc>
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for DateTime<Local>
impl<'r> Decode<'r, Sqlite> for DateTime<Local>
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for DateTime<FixedOffset>
impl<'r> Decode<'r, Sqlite> for DateTime<FixedOffset>
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for NaiveDateTime
impl<'r> Decode<'r, Sqlite> for NaiveDateTime
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for NaiveDate
impl<'r> Decode<'r, Sqlite> for NaiveDate
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for NaiveTime
impl<'r> Decode<'r, Sqlite> for NaiveTime
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for f32
impl<'r> Decode<'r, Sqlite> for f32
fn decode(value: SqliteValueRef<'r>) -> Result<f32, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for f64
impl<'r> Decode<'r, Sqlite> for f64
fn decode(value: SqliteValueRef<'r>) -> Result<f64, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for i8
impl<'r> Decode<'r, Sqlite> for i8
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for i16
impl<'r> Decode<'r, Sqlite> for i16
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for i32
impl<'r> Decode<'r, Sqlite> for i32
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for i64
impl<'r> Decode<'r, Sqlite> for i64
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for &'r str
impl<'r> Decode<'r, Sqlite> for &'r str
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for String
impl<'r> Decode<'r, Sqlite> for String
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for Cow<'r, str>
impl<'r> Decode<'r, Sqlite> for Cow<'r, str>
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for u8
impl<'r> Decode<'r, Sqlite> for u8
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for u16
impl<'r> Decode<'r, Sqlite> for u16
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, Sqlite> for u32
impl<'r> Decode<'r, Sqlite> for u32
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, Sqlite> for Uuid
impl Decode<'_, Sqlite> for Uuid
fn decode(value: SqliteValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, Sqlite> for Hyphenated
impl Decode<'_, Sqlite> for Hyphenated
fn decode(value: SqliteValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, MySql> for bool
impl Decode<'_, MySql> for bool
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, MySql> for &'r [u8]
impl<'r> Decode<'r, MySql> for &'r [u8]
fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, MySql> for Vec<u8>
impl Decode<'_, MySql> for Vec<u8>
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, MySql> for f32
impl Decode<'_, MySql> for f32
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, MySql> for f64
impl Decode<'_, MySql> for f64
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, MySql> for i8
impl Decode<'_, MySql> for i8
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, MySql> for i16
impl Decode<'_, MySql> for i16
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, MySql> for i32
impl Decode<'_, MySql> for i32
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, MySql> for i64
impl Decode<'_, MySql> for i64
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, MySql> for &'r str
impl<'r> Decode<'r, MySql> for &'r str
fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, MySql> for String
impl Decode<'_, MySql> for String
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, MySql> for Cow<'r, str>
impl<'r> Decode<'r, MySql> for Cow<'r, str>
fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, MySql> for u8
impl Decode<'_, MySql> for u8
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, MySql> for u16
impl Decode<'_, MySql> for u16
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, MySql> for u32
impl Decode<'_, MySql> for u32
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, MySql> for u64
impl Decode<'_, MySql> for u64
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, MySql> for BigDecimal
impl Decode<'_, MySql> for BigDecimal
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl Decode<'_, MySql> for Decimal
impl Decode<'_, MySql> for Decimal
fn decode(value: MySqlValueRef<'_>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, MySql> for DateTime<Utc>
impl<'r> Decode<'r, MySql> for DateTime<Utc>
Note: assumes the connection’s time_zone is set to +00:00 (UTC).
fn decode(value: MySqlValueRef<'r>) -> Result<Self, BoxDynError>
sourceimpl<'r> Decode<'r, MySql> for DateTime<Local>
impl<'r> Decode<'r, MySql> for DateTime<Local>
Note: assumes the connection’s time_zone is set to +00:00 (UTC).