rusqlite::types

Trait ToSql

Source
pub trait ToSql {
    // Required method
    fn to_sql(&self) -> Result<ToSqlOutput<'_>>;
}
Expand description

A trait for types that can be converted into SQLite values. Returns Error::ToSqlConversionFailure if the conversion fails.

Required Methods§

Source

fn to_sql(&self) -> Result<ToSqlOutput<'_>>

Converts Rust value to SQLite value

Implementations on Foreign Types§

Source§

impl ToSql for bool

Source§

impl ToSql for f32

Source§

impl ToSql for f64

Source§

impl ToSql for i8

Source§

impl ToSql for i16

Source§

impl ToSql for i32

Source§

impl ToSql for i64

Source§

impl ToSql for isize

Source§

impl ToSql for str

Source§

impl ToSql for u8

Source§

impl ToSql for u16

Source§

impl ToSql for u32

Source§

impl ToSql for u64

Source§

impl ToSql for usize

Source§

impl ToSql for String

Source§

impl ToSql for Vec<u8>

Source§

impl ToSql for NonZeroI8

Source§

impl ToSql for NonZeroI16

Source§

impl ToSql for NonZeroI32

Source§

impl ToSql for NonZeroI64

Source§

impl ToSql for NonZeroIsize

Source§

impl ToSql for NonZeroU8

Source§

impl ToSql for NonZeroU16

Source§

impl ToSql for NonZeroU32

Source§

impl ToSql for NonZeroU64

Source§

impl ToSql for NonZeroUsize

Source§

impl ToSql for [u8]

Source§

impl<T> ToSql for &T
where T: ToSql + ?Sized,

Source§

impl<T: ToSql + ToOwned + ?Sized> ToSql for Cow<'_, T>

Source§

impl<T: ToSql + ?Sized> ToSql for Box<T>

Source§

impl<T: ToSql + ?Sized> ToSql for Rc<T>

Source§

impl<T: ToSql + ?Sized> ToSql for Arc<T>

Source§

impl<T: ToSql> ToSql for Option<T>

Source§

impl<const N: usize> ToSql for [u8; N]

Implementors§