pub enum Value {
Integer(i64),
Float(f64),
Text(String),
Boolean(bool),
DateTime(i64),
Date(i64),
Time(String),
Null,
}
Variants§
Implementations§
source§impl Value
impl Value
pub fn plus(&self, other: &Value) -> Value
pub fn minus(&self, other: &Value) -> Value
pub fn mul(&self, other: &Value) -> Result<Value, String>
pub fn div(&self, other: &Value) -> Result<Value, String>
pub fn modulus(&self, other: &Value) -> Result<Value, String>
pub fn data_type(&self) -> DataType
pub fn literal(&self) -> String
pub fn as_int(&self) -> i64
pub fn as_float(&self) -> f64
pub fn as_text(&self) -> String
pub fn as_bool(&self) -> bool
pub fn as_date_time(&self) -> i64
pub fn as_date(&self) -> i64
pub fn as_time(&self) -> String
Trait Implementations§
source§impl Ord for Value
impl Ord for Value
source§impl PartialEq<Value> for Value
impl PartialEq<Value> for Value
source§impl PartialOrd<Value> for Value
impl PartialOrd<Value> for Value
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Value
Auto Trait Implementations§
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