pub trait FromSql: Sized {
// Required method
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>;
}
Expand description
A trait for types that can be created from a SQLite value.
Required Methods§
sourcefn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
Converts SQLite value into Rust value.
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl FromSql for bool
impl FromSql for bool
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl FromSql for f32
impl FromSql for f32
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl FromSql for f64
impl FromSql for f64
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl FromSql for i8
impl FromSql for i8
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl FromSql for i16
impl FromSql for i16
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl FromSql for i32
impl FromSql for i32
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl FromSql for i64
impl FromSql for i64
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl FromSql for isize
impl FromSql for isize
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl FromSql for u8
impl FromSql for u8
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl FromSql for u16
impl FromSql for u16
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl FromSql for u32
impl FromSql for u32
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl FromSql for u64
impl FromSql for u64
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl FromSql for usize
impl FromSql for usize
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl FromSql for DateTime<FixedOffset>
impl FromSql for DateTime<FixedOffset>
RFC3339 (“YYYY-MM-DD HH:MM:SS.SSS[+-]HH:MM”) into DateTime<FixedOffset>
.
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl FromSql for DateTime<Local>
impl FromSql for DateTime<Local>
RFC3339 (“YYYY-MM-DD HH:MM:SS.SSS[+-]HH:MM”) into DateTime<Local>
.
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl FromSql for DateTime<Utc>
impl FromSql for DateTime<Utc>
RFC3339 (“YYYY-MM-DD HH:MM:SS.SSS[+-]HH:MM”) into DateTime<Utc>
.
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl FromSql for NaiveDate
impl FromSql for NaiveDate
“YYYY-MM-DD” => ISO 8601 calendar date without timezone.
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl FromSql for NaiveDateTime
impl FromSql for NaiveDateTime
“YYYY-MM-DD HH:MM:SS”/“YYYY-MM-DD HH:MM:SS.SSS” => ISO 8601 combined date and time without timezone. (“YYYY-MM-DDTHH:MM:SS”/“YYYY-MM-DDTHH:MM:SS.SSS” also supported)
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
source§impl FromSql for NaiveTime
impl FromSql for NaiveTime
“HH:MM”/“HH:MM:SS”/“HH:MM:SS.SSS” => ISO 8601 time without timezone.