Skip to main content

Decode

Trait Decode 

Source
pub trait Decode<'r, DB>: Sized
where DB: Database,
{ // Required method fn decode( value: <DB as HasValueRef<'r>>::ValueRef, ) -> Result<Self, Box<dyn Error + Sync + Send>>; }
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ยง

Source

fn decode( value: <DB as HasValueRef<'r>>::ValueRef, ) -> Result<Self, Box<dyn Error + Sync + Send>>

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".

Implementations on Foreign Typesยง

Sourceยง

impl Decode<'_, Mssql> for BigDecimal

Sourceยง

impl Decode<'_, Mssql> for DateTime<FixedOffset>

Sourceยง

impl Decode<'_, Mssql> for DateTime<Utc>

Sourceยง

impl Decode<'_, Mssql> for Decimal

Sourceยง

impl Decode<'_, Mssql> for NaiveDate

Decodes Date values received from the server

Sourceยง

impl Decode<'_, Mssql> for NaiveDateTime

Decodes DateTime2N values received from the server

Sourceยง

impl Decode<'_, Mssql> for NaiveTime

Decodes Time values received from the server

Sourceยง

impl Decode<'_, Mssql> for String

Sourceยง

impl Decode<'_, Mssql> for Uuid

Sourceยง

fn decode( value: MssqlValueRef<'_>, ) -> Result<Uuid, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, Mssql> for Vec<u8>

Sourceยง

fn decode( value: MssqlValueRef<'_>, ) -> Result<Vec<u8>, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, Mssql> for bool

Sourceยง

fn decode( value: MssqlValueRef<'_>, ) -> Result<bool, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, Mssql> for f32

Sourceยง

impl Decode<'_, Mssql> for f64

Sourceยง

impl Decode<'_, Mssql> for i8

Sourceยง

impl Decode<'_, Mssql> for i16

Sourceยง

impl Decode<'_, Mssql> for i32

Sourceยง

impl Decode<'_, Mssql> for i64

Sourceยง

impl Decode<'_, Mssql> for u8

Sourceยง

impl Decode<'_, Mssql> for u16

Sourceยง

impl Decode<'_, Mssql> for u32

Sourceยง

impl Decode<'_, Mssql> for u64

Sourceยง

impl Decode<'_, MySql> for BigDecimal

Sourceยง

impl Decode<'_, MySql> for Decimal

Sourceยง

impl Decode<'_, MySql> for Hyphenated

Sourceยง

impl Decode<'_, MySql> for String

Sourceยง

impl Decode<'_, MySql> for Uuid

Sourceยง

fn decode( value: MySqlValueRef<'_>, ) -> Result<Uuid, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, MySql> for Vec<u8>

Sourceยง

fn decode( value: MySqlValueRef<'_>, ) -> Result<Vec<u8>, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, MySql> for bool

Sourceยง

fn decode( value: MySqlValueRef<'_>, ) -> Result<bool, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, MySql> for f32

Sourceยง

impl Decode<'_, MySql> for f64

Sourceยง

impl Decode<'_, MySql> for i8

Sourceยง

impl Decode<'_, MySql> for i16

Sourceยง

impl Decode<'_, MySql> for i32

Sourceยง

impl Decode<'_, MySql> for i64

Sourceยง

impl Decode<'_, MySql> for u8

Sourceยง

impl Decode<'_, MySql> for u16

Sourceยง

impl Decode<'_, MySql> for u32

Sourceยง

impl Decode<'_, MySql> for u64

Sourceยง

impl Decode<'_, Postgres> for BigDecimal

Sourceยง

impl Decode<'_, Postgres> for BitVec

Sourceยง

impl Decode<'_, Postgres> for Decimal

Sourceยง

fn decode( value: PgValueRef<'_>, ) -> Result<Decimal, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, Postgres> for IpNetwork

Sourceยง

impl Decode<'_, Postgres> for MacAddress

Sourceยง

impl Decode<'_, Postgres> for String

Sourceยง

impl Decode<'_, Postgres> for Uuid

Sourceยง

fn decode(value: PgValueRef<'_>) -> Result<Uuid, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, Postgres> for Vec<u8>

Sourceยง

fn decode( value: PgValueRef<'_>, ) -> Result<Vec<u8>, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, Postgres> for bool

Sourceยง

fn decode(value: PgValueRef<'_>) -> Result<bool, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, Postgres> for f32

Sourceยง

fn decode(value: PgValueRef<'_>) -> Result<f32, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, Postgres> for f64

Sourceยง

fn decode(value: PgValueRef<'_>) -> Result<f64, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, Postgres> for i8

Sourceยง

fn decode(value: PgValueRef<'_>) -> Result<i8, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, Postgres> for i16

Sourceยง

fn decode(value: PgValueRef<'_>) -> Result<i16, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, Postgres> for i32

Sourceยง

fn decode(value: PgValueRef<'_>) -> Result<i32, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, Postgres> for i64

Sourceยง

fn decode(value: PgValueRef<'_>) -> Result<i64, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, Postgres> for u16

Sourceยง

fn decode(value: PgValueRef<'_>) -> Result<u16, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, Postgres> for u32

Sourceยง

fn decode(value: PgValueRef<'_>) -> Result<u32, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, Postgres> for u64

Sourceยง

fn decode(value: PgValueRef<'_>) -> Result<u64, Box<dyn Error + Sync + Send>>

Sourceยง

impl Decode<'_, Sqlite> for BigDecimal

Sourceยง

impl Decode<'_, Sqlite> for Decimal

Sourceยง

impl Decode<'_, Sqlite> for Hyphenated

Sourceยง

impl Decode<'_, Sqlite> for Uuid

Sourceยง

fn decode( value: SqliteValueRef<'_>, ) -> Result<Uuid, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'db> Decode<'db, Postgres> for IpAddr
where IpNetwork: Decode<'db, Postgres>,

Sourceยง

fn decode( value: PgValueRef<'db>, ) -> Result<IpAddr, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r, DB, T> Decode<'r, DB> for Option<T>
where DB: Database, T: Decode<'r, DB>,

Sourceยง

fn decode( value: <DB as HasValueRef<'r>>::ValueRef, ) -> Result<Option<T>, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r, DB> Decode<'r, DB> for BString
where DB: Database, Vec<u8>: Decode<'r, DB>,

Sourceยง

fn decode( value: <DB as HasValueRef<'r>>::ValueRef, ) -> Result<BString, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r, DB> Decode<'r, DB> for Oid
where DB: Database, &'r [u8]: Decode<'r, DB>,

Sourceยง

fn decode( value: <DB as HasValueRef<'r>>::ValueRef, ) -> Result<Oid, Box<dyn Error + Sync + Send>>

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>,

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>,

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>,

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>,

Sourceยง

impl<'r, T1, T2, T3, T4, T5> Decode<'r, Postgres> for (T1, T2, T3, T4, T5)
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>,

Sourceยง

impl<'r, T1, T2, T3, T4> Decode<'r, Postgres> for (T1, T2, T3, T4)
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>,

Sourceยง

impl<'r, T1, T2, T3> Decode<'r, Postgres> for (T1, T2, T3)
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>,

Sourceยง

impl<'r, T1, T2> Decode<'r, Postgres> for (T1, T2)
where T1: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>, T2: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,

Sourceยง

fn decode( value: PgValueRef<'r>, ) -> Result<(T1, T2), Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r, T1> Decode<'r, Postgres> for (T1,)
where T1: 'r + Type<Postgres> + for<'a> Decode<'a, Postgres>,

Sourceยง

impl<'r, T, const N: usize> Decode<'r, Postgres> for [T; N]
where T: for<'a> Decode<'a, Postgres> + Type<Postgres>,

Sourceยง

impl<'r, T> Decode<'r, Postgres> for Vec<T>
where T: for<'a> Decode<'a, Postgres> + Type<Postgres>,

Sourceยง

fn decode(value: PgValueRef<'r>) -> Result<Vec<T>, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Any> for &'r [u8]
where &'r [u8]: AnyDecode<'r>,

Sourceยง

fn decode( value: AnyValueRef<'r>, ) -> Result<&'r [u8], Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Any> for &'r str
where &'r str: AnyDecode<'r>,

Sourceยง

fn decode( value: AnyValueRef<'r>, ) -> Result<&'r str, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Any> for BigDecimal
where BigDecimal: AnyDecode<'r>,

Sourceยง

impl<'r> Decode<'r, Any> for DateTime<FixedOffset>

Sourceยง

impl<'r> Decode<'r, Any> for DateTime<Local>
where DateTime<Local>: AnyDecode<'r>,

Sourceยง

impl<'r> Decode<'r, Any> for DateTime<Utc>
where DateTime<Utc>: AnyDecode<'r>,

Sourceยง

impl<'r> Decode<'r, Any> for Decimal
where Decimal: AnyDecode<'r>,

Sourceยง

fn decode( value: AnyValueRef<'r>, ) -> Result<Decimal, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Any> for NaiveDate
where NaiveDate: AnyDecode<'r>,

Sourceยง

impl<'r> Decode<'r, Any> for NaiveDateTime

Sourceยง

impl<'r> Decode<'r, Any> for NaiveTime
where NaiveTime: AnyDecode<'r>,

Sourceยง

impl<'r> Decode<'r, Any> for String
where String: AnyDecode<'r>,

Sourceยง

fn decode( value: AnyValueRef<'r>, ) -> Result<String, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Any> for Uuid
where Uuid: AnyDecode<'r>,

Sourceยง

impl<'r> Decode<'r, Any> for Vec<u8>
where Vec<u8>: AnyDecode<'r>,

Sourceยง

fn decode( value: AnyValueRef<'r>, ) -> Result<Vec<u8>, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Any> for bool
where bool: AnyDecode<'r>,

Sourceยง

impl<'r> Decode<'r, Any> for f32
where f32: AnyDecode<'r>,

Sourceยง

fn decode(value: AnyValueRef<'r>) -> Result<f32, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Any> for f64
where f64: AnyDecode<'r>,

Sourceยง

fn decode(value: AnyValueRef<'r>) -> Result<f64, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Any> for i8
where i8: AnyDecode<'r>,

Sourceยง

fn decode(value: AnyValueRef<'r>) -> Result<i8, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Any> for i16
where i16: AnyDecode<'r>,

Sourceยง

fn decode(value: AnyValueRef<'r>) -> Result<i16, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Any> for i32
where i32: AnyDecode<'r>,

Sourceยง

fn decode(value: AnyValueRef<'r>) -> Result<i32, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Any> for i64
where i64: AnyDecode<'r>,

Sourceยง

fn decode(value: AnyValueRef<'r>) -> Result<i64, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Any> for u16
where u16: AnyDecode<'r>,

Sourceยง

fn decode(value: AnyValueRef<'r>) -> Result<u16, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Any> for u32
where u32: AnyDecode<'r>,

Sourceยง

fn decode(value: AnyValueRef<'r>) -> Result<u32, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Any> for u64
where u64: AnyDecode<'r>,

Sourceยง

fn decode(value: AnyValueRef<'r>) -> Result<u64, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Mssql> for &'r [u8]

Sourceยง

fn decode( value: MssqlValueRef<'r>, ) -> Result<&'r [u8], Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Mssql> for Cow<'r, [u8]>

Sourceยง

fn decode( value: MssqlValueRef<'r>, ) -> Result<Cow<'r, [u8]>, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Mssql> for Cow<'r, str>

Sourceยง

fn decode( value: MssqlValueRef<'r>, ) -> Result<Cow<'r, str>, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, MySql> for &'r [u8]

Sourceยง

fn decode( value: MySqlValueRef<'r>, ) -> Result<&'r [u8], Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, MySql> for &'r str

Sourceยง

fn decode( value: MySqlValueRef<'r>, ) -> Result<&'r str, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, MySql> for Cow<'r, str>

Sourceยง

fn decode( value: MySqlValueRef<'r>, ) -> Result<Cow<'r, str>, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, MySql> for Date

Sourceยง

fn decode( value: MySqlValueRef<'r>, ) -> Result<Date, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, MySql> for DateTime<FixedOffset>

Note: assumes the connectionโ€™s time_zone is set to +00:00 (UTC).

Sourceยง

impl<'r> Decode<'r, MySql> for DateTime<Local>

Note: assumes the connectionโ€™s time_zone is set to +00:00 (UTC).

Sourceยง

impl<'r> Decode<'r, MySql> for DateTime<Utc>

Note: assumes the connectionโ€™s time_zone is set to +00:00 (UTC).

Sourceยง

impl<'r> Decode<'r, MySql> for NaiveDate

Sourceยง

impl<'r> Decode<'r, MySql> for NaiveDateTime

Sourceยง

impl<'r> Decode<'r, MySql> for NaiveTime

Sourceยง

impl<'r> Decode<'r, MySql> for OffsetDateTime

Sourceยง

impl<'r> Decode<'r, MySql> for PrimitiveDateTime

Sourceยง

impl<'r> Decode<'r, MySql> for Time

Sourceยง

fn decode( value: MySqlValueRef<'r>, ) -> Result<Time, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Odbc> for &'r [u8]

Sourceยง

fn decode( value: OdbcValueRef<'r>, ) -> Result<&'r [u8], Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Odbc> for &'r str

Sourceยง

fn decode( value: OdbcValueRef<'r>, ) -> Result<&'r str, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Odbc> for BigDecimal

Sourceยง

impl<'r> Decode<'r, Odbc> for Date

Sourceยง

impl<'r> Decode<'r, Odbc> for DateTime<FixedOffset>

Sourceยง

impl<'r> Decode<'r, Odbc> for DateTime<Local>

Sourceยง

impl<'r> Decode<'r, Odbc> for DateTime<Utc>

Sourceยง

impl<'r> Decode<'r, Odbc> for Decimal

Sourceยง

impl<'r> Decode<'r, Odbc> for NaiveDate

Sourceยง

impl<'r> Decode<'r, Odbc> for NaiveDateTime

Sourceยง

impl<'r> Decode<'r, Odbc> for NaiveTime

Sourceยง

impl<'r> Decode<'r, Odbc> for OffsetDateTime

Sourceยง

impl<'r> Decode<'r, Odbc> for PrimitiveDateTime

Sourceยง

impl<'r> Decode<'r, Odbc> for String

Sourceยง

fn decode( value: OdbcValueRef<'r>, ) -> Result<String, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Odbc> for Time

Sourceยง

impl<'r> Decode<'r, Odbc> for Uuid

Sourceยง

impl<'r> Decode<'r, Odbc> for Vec<u8>

Sourceยง

fn decode( value: OdbcValueRef<'r>, ) -> Result<Vec<u8>, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Odbc> for bool

Sourceยง

impl<'r> Decode<'r, Odbc> for f32

Sourceยง

impl<'r> Decode<'r, Odbc> for f64

Sourceยง

impl<'r> Decode<'r, Odbc> for i8

Sourceยง

fn decode(value: OdbcValueRef<'r>) -> Result<i8, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Odbc> for i16

Sourceยง

impl<'r> Decode<'r, Odbc> for i32

Sourceยง

impl<'r> Decode<'r, Odbc> for i64

Sourceยง

impl<'r> Decode<'r, Odbc> for u8

Sourceยง

fn decode(value: OdbcValueRef<'r>) -> Result<u8, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Odbc> for u16

Sourceยง

impl<'r> Decode<'r, Odbc> for u32

Sourceยง

impl<'r> Decode<'r, Odbc> for u64

Sourceยง

impl<'r> Decode<'r, Postgres> for &'r [u8]

Sourceยง

fn decode( value: PgValueRef<'r>, ) -> Result<&'r [u8], Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Postgres> for &'r str

Sourceยง

fn decode( value: PgValueRef<'r>, ) -> Result<&'r str, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Postgres> for ()

Sourceยง

fn decode(_value: PgValueRef<'r>) -> Result<(), Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Postgres> for Cow<'r, str>

Sourceยง

fn decode( value: PgValueRef<'r>, ) -> Result<Cow<'r, str>, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Postgres> for Date

Sourceยง

fn decode(value: PgValueRef<'r>) -> Result<Date, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Postgres> for DateTime<FixedOffset>

Sourceยง

impl<'r> Decode<'r, Postgres> for DateTime<Local>

Sourceยง

impl<'r> Decode<'r, Postgres> for DateTime<Utc>

Sourceยง

fn decode( value: PgValueRef<'r>, ) -> Result<DateTime<Utc>, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Postgres> for NaiveDate

Sourceยง

impl<'r> Decode<'r, Postgres> for NaiveDateTime

Sourceยง

impl<'r> Decode<'r, Postgres> for NaiveTime

Sourceยง

impl<'r> Decode<'r, Postgres> for OffsetDateTime

Sourceยง

impl<'r> Decode<'r, Postgres> for PrimitiveDateTime

Sourceยง

impl<'r> Decode<'r, Postgres> for Time

Sourceยง

fn decode(value: PgValueRef<'r>) -> Result<Time, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Sqlite> for &'r [u8]

Sourceยง

fn decode( value: SqliteValueRef<'r>, ) -> Result<&'r [u8], Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Sqlite> for &'r str

Sourceยง

fn decode( value: SqliteValueRef<'r>, ) -> Result<&'r str, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Sqlite> for Cow<'r, str>

Sourceยง

fn decode( value: SqliteValueRef<'r>, ) -> Result<Cow<'r, str>, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Sqlite> for Date

Sourceยง

fn decode( value: SqliteValueRef<'r>, ) -> Result<Date, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Sqlite> for DateTime<FixedOffset>

Sourceยง

impl<'r> Decode<'r, Sqlite> for DateTime<Local>

Sourceยง

impl<'r> Decode<'r, Sqlite> for DateTime<Utc>

Sourceยง

impl<'r> Decode<'r, Sqlite> for NaiveDate

Sourceยง

impl<'r> Decode<'r, Sqlite> for NaiveDateTime

Sourceยง

impl<'r> Decode<'r, Sqlite> for NaiveTime

Sourceยง

impl<'r> Decode<'r, Sqlite> for OffsetDateTime

Sourceยง

impl<'r> Decode<'r, Sqlite> for PrimitiveDateTime

Sourceยง

impl<'r> Decode<'r, Sqlite> for String

Sourceยง

impl<'r> Decode<'r, Sqlite> for Time

Sourceยง

fn decode( value: SqliteValueRef<'r>, ) -> Result<Time, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Sqlite> for Vec<u8>

Sourceยง

fn decode( value: SqliteValueRef<'r>, ) -> Result<Vec<u8>, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Sqlite> for bool

Sourceยง

fn decode( value: SqliteValueRef<'r>, ) -> Result<bool, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Sqlite> for f32

Sourceยง

fn decode( value: SqliteValueRef<'r>, ) -> Result<f32, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Sqlite> for f64

Sourceยง

fn decode( value: SqliteValueRef<'r>, ) -> Result<f64, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Sqlite> for i8

Sourceยง

impl<'r> Decode<'r, Sqlite> for i16

Sourceยง

fn decode( value: SqliteValueRef<'r>, ) -> Result<i16, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Sqlite> for i32

Sourceยง

fn decode( value: SqliteValueRef<'r>, ) -> Result<i32, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Sqlite> for i64

Sourceยง

fn decode( value: SqliteValueRef<'r>, ) -> Result<i64, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Sqlite> for u8

Sourceยง

impl<'r> Decode<'r, Sqlite> for u16

Sourceยง

fn decode( value: SqliteValueRef<'r>, ) -> Result<u16, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Sqlite> for u32

Sourceยง

fn decode( value: SqliteValueRef<'r>, ) -> Result<u32, Box<dyn Error + Sync + Send>>

Sourceยง

impl<'r> Decode<'r, Sqlite> for u64

Sourceยง

fn decode( value: SqliteValueRef<'r>, ) -> Result<u64, Box<dyn Error + Sync + Send>>

Sourceยง

impl<const N: usize> Decode<'_, Postgres> for [u8; N]

Sourceยง

fn decode( value: PgValueRef<'_>, ) -> Result<[u8; N], Box<dyn Error + Sync + Send>>

Implementorsยง

Sourceยง

impl Decode<'_, Postgres> for sqlx_oldapi::postgres::types::Oid

Sourceยง

impl Decode<'_, Postgres> for PgMoney

Sourceยง

impl<'de> Decode<'de, Postgres> for PgInterval

Sourceยง

impl<'r, DB> Decode<'r, DB> for &'r RawValue
where Json<&'r RawValue>: Decode<'r, DB>, DB: Database,

Sourceยง

impl<'r, DB> Decode<'r, DB> for Value
where Json<Value>: Decode<'r, DB>, DB: Database,

Sourceยง

impl<'r, T> Decode<'r, Mssql> for Json<T>
where T: 'r + Deserialize<'r>,

Sourceยง

impl<'r, T> Decode<'r, MySql> for Json<T>
where T: 'r + Deserialize<'r>,

Sourceยง

impl<'r, T> Decode<'r, Postgres> for Json<T>
where T: 'r + Deserialize<'r>,

Sourceยง

impl<'r, T> Decode<'r, Postgres> for PgRange<T>
where T: Type<Postgres> + for<'a> Decode<'a, Postgres>,

Sourceยง

impl<'r, T> Decode<'r, Sqlite> for Json<T>
where T: 'r + Deserialize<'r>,

Sourceยง

impl<'r> Decode<'r, Any> for Value
where Value: AnyDecode<'r>,

Sourceยง

impl<'r> Decode<'r, Odbc> for Value

Sourceยง

impl<'r> Decode<'r, Postgres> for PgLQuery

Sourceยง

impl<'r> Decode<'r, Postgres> for PgLTree

Sourceยง

impl<'r> Decode<'r, Postgres> for PgTimeTz

Sourceยง

impl<'r> Decode<'r, Postgres> for PgTimeTz<NaiveTime, FixedOffset>