[−][src]Enum rusqlite::types::ValueRef
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)
The value is a signed integer.
Real(f64)
The value is a floating point number.
Text(&'a [u8])
The value is a text string.
Blob(&'a [u8])
The value is a blob of data
Methods
impl<'_> ValueRef<'_>
[src]
impl<'a> ValueRef<'a>
[src]
pub fn as_i64(&self) -> FromSqlResult<i64>
[src]
If self
is case Integer
, returns the integral value. Otherwise,
returns Err(Error::InvalidColumnType)
.
pub fn as_f64(&self) -> FromSqlResult<f64>
[src]
If self
is case Real
, returns the floating point value. Otherwise,
returns Err(Error::InvalidColumnType)
.
pub fn as_str(&self) -> FromSqlResult<&'a str>
[src]
If self
is case Text
, returns the string value. Otherwise, returns
Err(Error::InvalidColumnType)
.
pub fn as_blob(&self) -> FromSqlResult<&'a [u8]>
[src]
If self
is case Blob
, returns the byte slice. Otherwise, returns
Err(Error::InvalidColumnType)
.
Trait Implementations
impl<'a> Clone for ValueRef<'a>
[src]
fn clone(&self) -> ValueRef<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'_> From<ValueRef<'_>> for Value
[src]
impl<'a> From<&'a str> for ValueRef<'a>
[src]
impl<'a> From<&'a [u8]> for ValueRef<'a>
[src]
impl<'a> From<&'a Value> for ValueRef<'a>
[src]
impl<'a> PartialEq<ValueRef<'a>> for ValueRef<'a>
[src]
impl<'a> Copy for ValueRef<'a>
[src]
impl<'a> Debug for ValueRef<'a>
[src]
Auto Trait Implementations
impl<'a> Sync for ValueRef<'a>
impl<'a> Send for ValueRef<'a>
impl<'a> Unpin for ValueRef<'a>
impl<'a> RefUnwindSafe for ValueRef<'a>
impl<'a> UnwindSafe for ValueRef<'a>
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,