pub enum Value {
Null,
Integer(i64),
Real(f64),
Text(String),
Blob(Vec<u8>),
}Expand description
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§
Trait Implementations§
Source§impl AsSqlTy for Value
impl AsSqlTy for Value
Source§type Borrowed<'p> = ValueRef<'p>
type Borrowed<'p> = ValueRef<'p>
The borrowed counterpart of this type (may be
Self, e.g.
for trivially-copiable types such as integers and floats).
This is used e.g. for constructing the Table::PrimaryKey
associated type, which in turn serves as the input type of
helper queries such as SelectByKey and DeleteByKey.Source§fn format_check_constraint(
column: &dyn Display,
formatter: &mut Formatter<'_>,
) -> Result
fn format_check_constraint( column: &dyn Display, formatter: &mut Formatter<'_>, ) -> Result
If the domain of this type requires a CHECK constraint,
this method should write out the relevant criteria. The
column name will be given as the
column argument. If
the body of this function doesn’t write anything to the
formatter, no CHECK constraint is going to be emitted. Read moreSource§impl FromSql for Value
impl FromSql for Value
Source§fn column_result(value: ValueRef<'_>) -> Result<Value, FromSqlError>
fn column_result(value: ValueRef<'_>) -> Result<Value, FromSqlError>
Converts SQLite value into Rust value.
Source§impl ResultRecord for Value
impl ResultRecord for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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