Enum rusqlite::types::Value[][src]

pub enum Value {
    Null,
    Integer(i64),
    Real(f64),
    Text(String),
    Blob(Vec<u8>),
}

Owning dynamic type value. Value’s type is typically dictated by SQLite (not by the caller).

See ValueRef for a non-owning dynamic type value.

Variants

Null

The value is a NULL value.

Integer(i64)

The value is a signed integer.

Real(f64)

The value is a floating point number.

Text(String)

The value is a text string.

Blob(Vec<u8>)

The value is a blob of data

Implementations

impl Value[src]

pub fn data_type(&self) -> Type[src]

Returns SQLite fundamental datatype.

Trait Implementations

impl Clone for Value[src]

fn clone(&self) -> Value[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Value[src]

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

Formats the value using the given formatter. Read more

impl<'a> From<&'a Value> for ValueRef<'a>[src]

fn from(value: &'a Value) -> ValueRef<'a>[src]

Performs the conversion.

impl From<Null> for Value[src]

fn from(_: Null) -> Value[src]

Performs the conversion.

impl<T> From<Option<T>> for Value where
    T: Into<Value>, 
[src]

fn from(v: Option<T>) -> Value[src]

Performs the conversion.

impl From<String> for Value[src]

fn from(s: String) -> Value[src]

Performs the conversion.

impl From<ValueRef<'_>> for Value[src]

fn from(borrowed: ValueRef<'_>) -> Value[src]

Performs the conversion.

impl From<Vec<u8, Global>> for Value[src]

fn from(v: Vec<u8>) -> Value[src]

Performs the conversion.

impl From<bool> for Value[src]

fn from(i: bool) -> Value[src]

Performs the conversion.

impl From<f32> for Value[src]

fn from(f: f32) -> Value[src]

Performs the conversion.

impl From<f64> for Value[src]

fn from(f: f64) -> Value[src]

Performs the conversion.

impl From<i16> for Value[src]

fn from(i: i16) -> Value[src]

Performs the conversion.

impl From<i32> for Value[src]

fn from(i: i32) -> Value[src]

Performs the conversion.

impl From<i64> for Value[src]

fn from(i: i64) -> Value[src]

Performs the conversion.

impl From<i8> for Value[src]

fn from(i: i8) -> Value[src]

Performs the conversion.

impl From<isize> for Value[src]

fn from(i: isize) -> Value[src]

Performs the conversion.

impl From<u16> for Value[src]

fn from(i: u16) -> Value[src]

Performs the conversion.

impl From<u32> for Value[src]

fn from(i: u32) -> Value[src]

Performs the conversion.

impl From<u8> for Value[src]

fn from(i: u8) -> Value[src]

Performs the conversion.

impl FromSql for Value[src]

fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>[src]

Converts SQLite value into Rust value.

impl PartialEq<Value> for Value[src]

fn eq(&self, other: &Value) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Value) -> bool[src]

This method tests for !=.

impl ToSql for Value[src]

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

Converts Rust value to SQLite value

impl StructuralPartialEq for Value[src]

Auto Trait Implementations

impl RefUnwindSafe for Value

impl Send for Value

impl Sync for Value

impl Unpin for Value

impl UnwindSafe for Value

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.