pub enum OwnedSQLiteValue {
Integer(i64),
Real(f64),
Text(String),
Blob(Box<[u8]>),
Null,
}Expand description
Represents a SQLite value (owned version)
Variants§
Integer(i64)
Integer value (i64)
Real(f64)
Real value (f64)
Text(String)
Text value (owned string)
Blob(Box<[u8]>)
Blob value (owned binary data)
Null
NULL value
Implementations§
Source§impl OwnedSQLiteValue
impl OwnedSQLiteValue
Sourcepub fn as_value(&self) -> SQLiteValue<'_>
pub fn as_value(&self) -> SQLiteValue<'_>
Returns a borrowed SQLiteValue view of this owned value.
Sourcepub fn convert<T: FromSQLiteValue>(self) -> Result<T, DrizzleError>
pub fn convert<T: FromSQLiteValue>(self) -> Result<T, DrizzleError>
Convert this SQLite value to a Rust type using the FromSQLiteValue trait.
This provides a unified conversion interface for all types that implement
FromSQLiteValue, including primitives and enum types.
Sourcepub fn convert_ref<T: FromSQLiteValue>(&self) -> Result<T, DrizzleError>
pub fn convert_ref<T: FromSQLiteValue>(&self) -> Result<T, DrizzleError>
Convert a reference to this SQLite value to a Rust type.
Trait Implementations§
Source§impl Clone for OwnedSQLiteValue
impl Clone for OwnedSQLiteValue
Source§fn clone(&self) -> OwnedSQLiteValue
fn clone(&self) -> OwnedSQLiteValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OwnedSQLiteValue
impl Debug for OwnedSQLiteValue
Source§impl Default for OwnedSQLiteValue
impl Default for OwnedSQLiteValue
Source§fn default() -> OwnedSQLiteValue
fn default() -> OwnedSQLiteValue
Returns the “default value” for a type. Read more
Source§impl Display for OwnedSQLiteValue
impl Display for OwnedSQLiteValue
Source§impl From<&[u8]> for OwnedSQLiteValue
impl From<&[u8]> for OwnedSQLiteValue
Source§impl<'a> From<&'a OwnedSQLiteValue> for Cow<'a, OwnedSQLiteValue>
impl<'a> From<&'a OwnedSQLiteValue> for Cow<'a, OwnedSQLiteValue>
Source§fn from(value: &'a OwnedSQLiteValue) -> Self
fn from(value: &'a OwnedSQLiteValue) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a OwnedSQLiteValue> for SQLiteValue<'a>
impl<'a> From<&'a OwnedSQLiteValue> for SQLiteValue<'a>
Source§fn from(value: &'a OwnedSQLiteValue) -> Self
fn from(value: &'a OwnedSQLiteValue) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&SQLiteValue<'a>> for OwnedSQLiteValue
impl<'a> From<&SQLiteValue<'a>> for OwnedSQLiteValue
Source§fn from(value: &SQLiteValue<'a>) -> Self
fn from(value: &SQLiteValue<'a>) -> Self
Converts to this type from the input type.
Source§impl From<&String> for OwnedSQLiteValue
impl From<&String> for OwnedSQLiteValue
Source§impl From<&bool> for OwnedSQLiteValue
impl From<&bool> for OwnedSQLiteValue
Source§impl From<&f32> for OwnedSQLiteValue
impl From<&f32> for OwnedSQLiteValue
Source§impl From<&f64> for OwnedSQLiteValue
impl From<&f64> for OwnedSQLiteValue
Source§impl From<&i16> for OwnedSQLiteValue
impl From<&i16> for OwnedSQLiteValue
Source§impl From<&i32> for OwnedSQLiteValue
impl From<&i32> for OwnedSQLiteValue
Source§impl From<&i64> for OwnedSQLiteValue
impl From<&i64> for OwnedSQLiteValue
Source§impl From<&i8> for OwnedSQLiteValue
impl From<&i8> for OwnedSQLiteValue
Source§impl From<&isize> for OwnedSQLiteValue
impl From<&isize> for OwnedSQLiteValue
Source§impl From<&str> for OwnedSQLiteValue
impl From<&str> for OwnedSQLiteValue
Source§impl From<&u16> for OwnedSQLiteValue
impl From<&u16> for OwnedSQLiteValue
Source§impl From<&u32> for OwnedSQLiteValue
impl From<&u32> for OwnedSQLiteValue
Source§impl From<&u64> for OwnedSQLiteValue
impl From<&u64> for OwnedSQLiteValue
Source§impl From<&u8> for OwnedSQLiteValue
impl From<&u8> for OwnedSQLiteValue
Source§impl From<&usize> for OwnedSQLiteValue
impl From<&usize> for OwnedSQLiteValue
Source§impl<T> From<Option<T>> for OwnedSQLiteValuewhere
T: TryInto<OwnedSQLiteValue>,
impl<T> From<Option<T>> for OwnedSQLiteValuewhere
T: TryInto<OwnedSQLiteValue>,
Source§impl From<OwnedSQLiteValue> for Cow<'_, OwnedSQLiteValue>
impl From<OwnedSQLiteValue> for Cow<'_, OwnedSQLiteValue>
Source§fn from(value: OwnedSQLiteValue) -> Self
fn from(value: OwnedSQLiteValue) -> Self
Converts to this type from the input type.
Source§impl<'a> From<OwnedSQLiteValue> for SQL<'a, OwnedSQLiteValue>
impl<'a> From<OwnedSQLiteValue> for SQL<'a, OwnedSQLiteValue>
Source§fn from(value: OwnedSQLiteValue) -> Self
fn from(value: OwnedSQLiteValue) -> Self
Converts to this type from the input type.
Source§impl<'a> From<OwnedSQLiteValue> for SQLiteValue<'a>
impl<'a> From<OwnedSQLiteValue> for SQLiteValue<'a>
Source§fn from(value: OwnedSQLiteValue) -> Self
fn from(value: OwnedSQLiteValue) -> Self
Converts to this type from the input type.
Source§impl<'a> From<SQLiteValue<'a>> for OwnedSQLiteValue
impl<'a> From<SQLiteValue<'a>> for OwnedSQLiteValue
Source§fn from(value: SQLiteValue<'a>) -> Self
fn from(value: SQLiteValue<'a>) -> Self
Converts to this type from the input type.
Source§impl From<String> for OwnedSQLiteValue
impl From<String> for OwnedSQLiteValue
Source§impl From<bool> for OwnedSQLiteValue
impl From<bool> for OwnedSQLiteValue
Source§impl From<f32> for OwnedSQLiteValue
impl From<f32> for OwnedSQLiteValue
Source§impl From<f64> for OwnedSQLiteValue
impl From<f64> for OwnedSQLiteValue
Source§impl From<i16> for OwnedSQLiteValue
impl From<i16> for OwnedSQLiteValue
Source§impl From<i32> for OwnedSQLiteValue
impl From<i32> for OwnedSQLiteValue
Source§impl From<i64> for OwnedSQLiteValue
impl From<i64> for OwnedSQLiteValue
Source§impl From<i8> for OwnedSQLiteValue
impl From<i8> for OwnedSQLiteValue
Source§impl From<isize> for OwnedSQLiteValue
impl From<isize> for OwnedSQLiteValue
Source§impl From<u16> for OwnedSQLiteValue
impl From<u16> for OwnedSQLiteValue
Source§impl From<u32> for OwnedSQLiteValue
impl From<u32> for OwnedSQLiteValue
Source§impl From<u64> for OwnedSQLiteValue
impl From<u64> for OwnedSQLiteValue
Source§impl From<u8> for OwnedSQLiteValue
impl From<u8> for OwnedSQLiteValue
Source§impl From<usize> for OwnedSQLiteValue
impl From<usize> for OwnedSQLiteValue
Source§impl<'a> FromIterator<&'a OwnedSQLiteValue> for Vec<SQLiteValue<'a>>
impl<'a> FromIterator<&'a OwnedSQLiteValue> for Vec<SQLiteValue<'a>>
Source§fn from_iter<T: IntoIterator<Item = &'a OwnedSQLiteValue>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = &'a OwnedSQLiteValue>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl<'a> FromIterator<OwnedSQLiteValue> for Vec<SQLiteValue<'a>>
impl<'a> FromIterator<OwnedSQLiteValue> for Vec<SQLiteValue<'a>>
Source§fn from_iter<T: IntoIterator<Item = OwnedSQLiteValue>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = OwnedSQLiteValue>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl PartialEq for OwnedSQLiteValue
impl PartialEq for OwnedSQLiteValue
Source§impl PartialOrd for OwnedSQLiteValue
impl PartialOrd for OwnedSQLiteValue
Source§impl SQLParam for OwnedSQLiteValue
impl SQLParam for OwnedSQLiteValue
Source§impl<'a> TryFrom<&'a OwnedSQLiteValue> for &'a [u8]
impl<'a> TryFrom<&'a OwnedSQLiteValue> for &'a [u8]
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl<'a> TryFrom<&'a OwnedSQLiteValue> for &'a str
impl<'a> TryFrom<&'a OwnedSQLiteValue> for &'a str
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<&OwnedSQLiteValue> for String
impl TryFrom<&OwnedSQLiteValue> for String
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<&OwnedSQLiteValue> for Vec<u8>
impl TryFrom<&OwnedSQLiteValue> for Vec<u8>
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<&OwnedSQLiteValue> for bool
impl TryFrom<&OwnedSQLiteValue> for bool
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<&OwnedSQLiteValue> for f32
impl TryFrom<&OwnedSQLiteValue> for f32
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<&OwnedSQLiteValue> for f64
impl TryFrom<&OwnedSQLiteValue> for f64
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<&OwnedSQLiteValue> for i16
impl TryFrom<&OwnedSQLiteValue> for i16
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<&OwnedSQLiteValue> for i32
impl TryFrom<&OwnedSQLiteValue> for i32
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<&OwnedSQLiteValue> for i64
impl TryFrom<&OwnedSQLiteValue> for i64
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<&OwnedSQLiteValue> for i8
impl TryFrom<&OwnedSQLiteValue> for i8
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<&OwnedSQLiteValue> for isize
impl TryFrom<&OwnedSQLiteValue> for isize
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<&OwnedSQLiteValue> for u16
impl TryFrom<&OwnedSQLiteValue> for u16
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<&OwnedSQLiteValue> for u32
impl TryFrom<&OwnedSQLiteValue> for u32
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<&OwnedSQLiteValue> for u64
impl TryFrom<&OwnedSQLiteValue> for u64
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<&OwnedSQLiteValue> for u8
impl TryFrom<&OwnedSQLiteValue> for u8
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<&OwnedSQLiteValue> for usize
impl TryFrom<&OwnedSQLiteValue> for usize
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<OwnedSQLiteValue> for String
impl TryFrom<OwnedSQLiteValue> for String
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<OwnedSQLiteValue> for Vec<u8>
impl TryFrom<OwnedSQLiteValue> for Vec<u8>
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<OwnedSQLiteValue> for bool
impl TryFrom<OwnedSQLiteValue> for bool
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<OwnedSQLiteValue> for f32
impl TryFrom<OwnedSQLiteValue> for f32
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<OwnedSQLiteValue> for f64
impl TryFrom<OwnedSQLiteValue> for f64
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<OwnedSQLiteValue> for i16
impl TryFrom<OwnedSQLiteValue> for i16
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<OwnedSQLiteValue> for i32
impl TryFrom<OwnedSQLiteValue> for i32
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<OwnedSQLiteValue> for i64
impl TryFrom<OwnedSQLiteValue> for i64
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<OwnedSQLiteValue> for i8
impl TryFrom<OwnedSQLiteValue> for i8
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<OwnedSQLiteValue> for isize
impl TryFrom<OwnedSQLiteValue> for isize
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<OwnedSQLiteValue> for u16
impl TryFrom<OwnedSQLiteValue> for u16
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<OwnedSQLiteValue> for u32
impl TryFrom<OwnedSQLiteValue> for u32
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<OwnedSQLiteValue> for u64
impl TryFrom<OwnedSQLiteValue> for u64
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<OwnedSQLiteValue> for u8
impl TryFrom<OwnedSQLiteValue> for u8
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
Source§impl TryFrom<OwnedSQLiteValue> for usize
impl TryFrom<OwnedSQLiteValue> for usize
Source§type Error = DrizzleError
type Error = DrizzleError
The type returned in the event of a conversion error.
impl StructuralPartialEq for OwnedSQLiteValue
Auto Trait Implementations§
impl Freeze for OwnedSQLiteValue
impl RefUnwindSafe for OwnedSQLiteValue
impl Send for OwnedSQLiteValue
impl Sync for OwnedSQLiteValue
impl Unpin for OwnedSQLiteValue
impl UnwindSafe for OwnedSQLiteValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more