Enum rusqlite::types::ValueRef[][src]

pub enum ValueRef<'a> {
    Null,
    Integer(i64),
    Real(f64),
    Text(&'a [u8]),
    Blob(&'a [u8]),
}
Expand description

A non-owning dynamic type value. Typically the memory backing this value is owned by SQLite.

See Value for an owning dynamic type value.

Variants

Null

The value is a NULL value.

Integer(i64)

Tuple Fields

0: i64

The value is a signed integer.

Real(f64)

Tuple Fields

0: f64

The value is a floating point number.

Text(&'a [u8])

Tuple Fields

The value is a text string.

Blob(&'a [u8])

Tuple Fields

The value is a blob of data

Implementations

Returns SQLite fundamental datatype.

If self is case Integer, returns the integral value. Otherwise, returns [Err(Error::InvalidColumnType)](crate::Error:: InvalidColumnType).

If self is case Real, returns the floating point value. Otherwise, returns [Err(Error::InvalidColumnType)](crate::Error:: InvalidColumnType).

If self is case Text, returns the string value. Otherwise, returns Err(Error::InvalidColumnType).

If self is case Blob, returns the byte slice. Otherwise, returns Err(Error::InvalidColumnType).

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

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

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.