pub enum DataValue {
Show 16 variants
Null,
Boolean(Option<bool>),
Float32(Option<f32>),
Float64(Option<f64>),
Int8(Option<i8>),
Int16(Option<i16>),
Int32(Option<i32>),
Int64(Option<i64>),
UInt8(Option<u8>),
UInt16(Option<u16>),
UInt32(Option<u32>),
UInt64(Option<u64>),
Utf8(Option<String>),
Date32(Option<i32>),
Date64(Option<i64>),
Decimal(Option<Decimal>),
}
Variants§
Null
Boolean(Option<bool>)
Float32(Option<f32>)
Float64(Option<f64>)
Int8(Option<i8>)
Int16(Option<i16>)
Int32(Option<i32>)
Int64(Option<i64>)
UInt8(Option<u8>)
UInt16(Option<u16>)
UInt32(Option<u32>)
UInt64(Option<u64>)
Utf8(Option<String>)
Date32(Option<i32>)
Date stored as a signed 32bit int days since UNIX epoch 1970-01-01
Date64(Option<i64>)
Date stored as a signed 64bit int timestamp since UNIX epoch 1970-01-01
Decimal(Option<Decimal>)
Implementations§
source§impl DataValue
impl DataValue
pub fn bool(&self) -> Option<bool>
pub fn float(&self) -> Option<f32>
pub fn double(&self) -> Option<f64>
pub fn i8(&self) -> Option<i8>
pub fn i16(&self) -> Option<i16>
pub fn i32(&self) -> Option<i32>
pub fn i64(&self) -> Option<i64>
pub fn u8(&self) -> Option<u8>
pub fn u16(&self) -> Option<u16>
pub fn u32(&self) -> Option<u32>
pub fn u64(&self) -> Option<u64>
pub fn utf8(&self) -> Option<String>
pub fn decimal(&self) -> Option<Decimal>
source§impl DataValue
impl DataValue
pub fn date(&self) -> Option<NaiveDate>
pub fn datetime(&self) -> Option<NaiveDateTime>
pub fn is_variable(&self) -> bool
pub fn is_null(&self) -> bool
pub fn none(logic_type: &LogicalType) -> DataValue
pub fn init(logic_type: &LogicalType) -> DataValue
pub fn to_raw(&self) -> Vec<u8> ⓘ
pub fn from_raw(bytes: &[u8], ty: &LogicalType) -> Self
pub fn logical_type(&self) -> LogicalType
pub fn memcomparable_encode(&self, b: &mut Vec<u8>) -> Result<(), TypeError>
pub fn cast(self, to: &LogicalType) -> Result<DataValue, TypeError>
Trait Implementations§
source§impl<'de> Deserialize<'de> for DataValue
impl<'de> Deserialize<'de> for DataValue
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for DataValue
impl PartialEq for DataValue
source§impl PartialOrd for DataValue
impl PartialOrd for DataValue
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 DataValue
Auto Trait Implementations§
impl RefUnwindSafe for DataValue
impl Send for DataValue
impl Sync for DataValue
impl Unpin for DataValue
impl UnwindSafe for DataValue
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.