rusqlite::types

Enum ToSqlOutput

Source
#[non_exhaustive]
pub enum ToSqlOutput<'a> { Borrowed(ValueRef<'a>), Owned(Value), }
Expand description

ToSqlOutput represents the possible output types for implementers of the ToSql trait.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Borrowed(ValueRef<'a>)

A borrowed SQLite-representable value.

§

Owned(Value)

An owned SQLite-representable value.

Trait Implementations§

Source§

impl<'a> Clone for ToSqlOutput<'a>

Source§

fn clone(&self) -> ToSqlOutput<'a>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for ToSqlOutput<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a, T: ?Sized> From<&'a T> for ToSqlOutput<'a>
where &'a T: Into<ValueRef<'a>>,

Source§

fn from(t: &'a T) -> Self

Converts to this type from the input type.
Source§

impl From<NonZero<i16>> for ToSqlOutput<'_>

Source§

fn from(t: NonZeroI16) -> Self

Converts to this type from the input type.
Source§

impl From<NonZero<i32>> for ToSqlOutput<'_>

Source§

fn from(t: NonZeroI32) -> Self

Converts to this type from the input type.
Source§

impl From<NonZero<i64>> for ToSqlOutput<'_>

Source§

fn from(t: NonZeroI64) -> Self

Converts to this type from the input type.
Source§

impl From<NonZero<i8>> for ToSqlOutput<'_>

Source§

fn from(t: NonZeroI8) -> Self

Converts to this type from the input type.
Source§

impl From<NonZero<isize>> for ToSqlOutput<'_>

Source§

fn from(t: NonZeroIsize) -> Self

Converts to this type from the input type.
Source§

impl From<NonZero<u16>> for ToSqlOutput<'_>

Source§

fn from(t: NonZeroU16) -> Self

Converts to this type from the input type.
Source§

impl From<NonZero<u32>> for ToSqlOutput<'_>

Source§

fn from(t: NonZeroU32) -> Self

Converts to this type from the input type.
Source§

impl From<NonZero<u8>> for ToSqlOutput<'_>

Source§

fn from(t: NonZeroU8) -> Self

Converts to this type from the input type.
Source§

impl From<Null> for ToSqlOutput<'_>

Source§

fn from(t: Null) -> Self

Converts to this type from the input type.
Source§

impl From<String> for ToSqlOutput<'_>

Source§

fn from(t: String) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<u8>> for ToSqlOutput<'_>

Source§

fn from(t: Vec<u8>) -> Self

Converts to this type from the input type.
Source§

impl From<bool> for ToSqlOutput<'_>

Source§

fn from(t: bool) -> Self

Converts to this type from the input type.
Source§

impl From<f32> for ToSqlOutput<'_>

Source§

fn from(t: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for ToSqlOutput<'_>

Source§

fn from(t: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i16> for ToSqlOutput<'_>

Source§

fn from(t: i16) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for ToSqlOutput<'_>

Source§

fn from(t: i32) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for ToSqlOutput<'_>

Source§

fn from(t: i64) -> Self

Converts to this type from the input type.
Source§

impl From<i8> for ToSqlOutput<'_>

Source§

fn from(t: i8) -> Self

Converts to this type from the input type.
Source§

impl From<isize> for ToSqlOutput<'_>

Source§

fn from(t: isize) -> Self

Converts to this type from the input type.
Source§

impl From<u16> for ToSqlOutput<'_>

Source§

fn from(t: u16) -> Self

Converts to this type from the input type.
Source§

impl From<u32> for ToSqlOutput<'_>

Source§

fn from(t: u32) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for ToSqlOutput<'_>

Source§

fn from(t: u8) -> Self

Converts to this type from the input type.
Source§

impl<'a> PartialEq for ToSqlOutput<'a>

Source§

fn eq(&self, other: &ToSqlOutput<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl ToSql for ToSqlOutput<'_>

Source§

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

Converts Rust value to SQLite value
Source§

impl<'a> StructuralPartialEq for ToSqlOutput<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for ToSqlOutput<'a>

§

impl<'a> RefUnwindSafe for ToSqlOutput<'a>

§

impl<'a> Send for ToSqlOutput<'a>

§

impl<'a> Sync for ToSqlOutput<'a>

§

impl<'a> Unpin for ToSqlOutput<'a>

§

impl<'a> UnwindSafe for ToSqlOutput<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.