Trait rusqlite::types::FromSql [] [src]

pub trait FromSql: Sized {
    fn column_result(value: ValueRef) -> FromSqlResult<Self>;
}

A trait for types that can be created from a SQLite value.

Note that FromSql and ToSql are defined for most integral types, but not u64 or usize. This is intentional; SQLite returns integers as signed 64-bit values, which cannot fully represent the range of these types. Rusqlite would have to decide how to handle negative values: return an error or reinterpret as a very large postive numbers, neither of which is guaranteed to be correct for everyone. Callers can work around this by fetching values as i64 and then doing the interpretation themselves or by defining a newtype and implementing FromSql/ToSql for it.

Required Methods

Implementations on Foreign Types

impl FromSql for i8
[src]

impl FromSql for i16
[src]

impl FromSql for i32
[src]

impl FromSql for isize
[src]

impl FromSql for u8
[src]

impl FromSql for u16
[src]

impl FromSql for u32
[src]

impl FromSql for i64
[src]

impl FromSql for f64
[src]

impl FromSql for bool
[src]

impl FromSql for String
[src]

impl FromSql for Vec<u8>
[src]

impl<T: FromSql> FromSql for Option<T>
[src]

impl FromSql for Timespec
[src]

Implementors