pub enum Value {
Null,
Integer(i64),
Real(f64),
Text(String),
Boolean(bool),
}Variants§
Implementations§
Source§impl Value
impl Value
pub fn type_name(&self) -> &'static str
Sourcepub fn cmp_value(&self, other: &Value) -> Ordering
pub fn cmp_value(&self, other: &Value) -> Ordering
Total ordering used by comparisons and B-trees. NULL sorts lowest.
Sourcepub fn is_truthy(&self) -> Option<bool>
pub fn is_truthy(&self) -> Option<bool>
Truthiness per SQL-ish rules: nonzero numbers and their own values.
pub fn coerce_to(&self, ty: &ColumnType) -> Result<Value, String>
Trait Implementations§
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 UnsafeUnpin 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