Trait diesel::types::FromSql
[−]
[src]
pub trait FromSql<A, DB: Backend + HasSqlType<A>>: Sized {
fn from_sql(
bytes: Option<&DB::RawValue>
) -> Result<Self, Box<Error + Send + Sync>>;
}How to deserialize a single field of a given type. The input will always be the binary representation, not the text.
Required Methods
Implementations on Foreign Types
impl<DB: Backend<RawValue = [u8]>> FromSql<Float, DB> for f32[src]
impl<DB: Backend<RawValue = [u8]>> FromSql<Double, DB> for f64[src]
impl<DB: Backend<RawValue = [u8]>> FromSql<SmallInt, DB> for i16[src]
impl<DB: Backend<RawValue = [u8]>> FromSql<Integer, DB> for i32[src]
impl<DB: Backend<RawValue = [u8]>> FromSql<BigInt, DB> for i64[src]
impl<T, ST, DB> FromSql<Nullable<ST>, DB> for Option<T> where
T: FromSql<ST, DB>,
DB: Backend + HasSqlType<ST>,
ST: NotNull, [src]
T: FromSql<ST, DB>,
DB: Backend + HasSqlType<ST>,
ST: NotNull,
impl<DB: Backend<RawValue = [u8]>> FromSql<Text, DB> for String[src]
impl<DB: Backend<RawValue = [u8]>> FromSql<Binary, DB> for Vec<u8>[src]
impl<'a, T: ?Sized, ST, DB> FromSql<ST, DB> for Cow<'a, T> where
T: 'a + ToOwned,
DB: Backend + HasSqlType<ST>,
T::Owned: FromSql<ST, DB>, [src]
T: 'a + ToOwned,
DB: Backend + HasSqlType<ST>,
T::Owned: FromSql<ST, DB>,
impl<T, ST> FromSql<Array<ST>, Pg> for Vec<T> where
T: FromSql<ST, Pg>,
Pg: HasSqlType<ST>, [src]
T: FromSql<ST, Pg>,
Pg: HasSqlType<ST>,
impl FromSql<Timestamp, Pg> for SystemTime[src]
impl FromSql<Timestamp, Pg> for NaiveDateTime[src]
impl FromSql<Timestamptz, Pg> for NaiveDateTime[src]
impl FromSql<Timestamptz, Pg> for DateTime<UTC>[src]
impl FromSql<Time, Pg> for NaiveTime[src]
impl FromSql<Date, Pg> for NaiveDate[src]
impl FromSql<Oid, Pg> for u32[src]
impl FromSql<Bool, Pg> for bool[src]
impl FromSql<Uuid, Pg> for Uuid[src]
impl FromSql<Date, Sqlite> for String[src]
impl FromSql<Time, Sqlite> for String[src]
impl FromSql<Timestamp, Sqlite> for String[src]
impl FromSql<VarChar, Sqlite> for String[src]
impl FromSql<Binary, Sqlite> for Vec<u8>[src]
impl FromSql<SmallInt, Sqlite> for i16[src]
impl FromSql<Integer, Sqlite> for i32[src]
impl FromSql<Bool, Sqlite> for bool[src]
impl FromSql<BigInt, Sqlite> for i64[src]
impl FromSql<Float, Sqlite> for f32[src]
impl FromSql<Double, Sqlite> for f64[src]
Implementors
impl FromSql<Timestamp, Pg> for PgTimestamppostgresimpl FromSql<Timestamptz, Pg> for PgTimestamppostgresimpl FromSql<Date, Pg> for PgDatepostgresimpl FromSql<Time, Pg> for PgTimepostgresimpl FromSql<Interval, Pg> for PgIntervalpostgresimpl FromSql<Numeric, Pg> for PgNumericpostgres