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

source

pub fn bool(&self) -> Option<bool>

source

pub fn float(&self) -> Option<f32>

source

pub fn double(&self) -> Option<f64>

source

pub fn i8(&self) -> Option<i8>

source

pub fn i16(&self) -> Option<i16>

source

pub fn i32(&self) -> Option<i32>

source

pub fn i64(&self) -> Option<i64>

source

pub fn u8(&self) -> Option<u8>

source

pub fn u16(&self) -> Option<u16>

source

pub fn u32(&self) -> Option<u32>

source

pub fn u64(&self) -> Option<u64>

source

pub fn utf8(&self) -> Option<String>

source

pub fn decimal(&self) -> Option<Decimal>

source§

impl DataValue

source

pub fn date(&self) -> Option<NaiveDate>

source

pub fn datetime(&self) -> Option<NaiveDateTime>

source

pub fn is_variable(&self) -> bool

source

pub fn is_null(&self) -> bool

source

pub fn none(logic_type: &LogicalType) -> DataValue

source

pub fn init(logic_type: &LogicalType) -> DataValue

source

pub fn to_raw(&self) -> Vec<u8>

source

pub fn from_raw(bytes: &[u8], ty: &LogicalType) -> Self

source

pub fn logical_type(&self) -> LogicalType

source

pub fn memcomparable_encode(&self, b: &mut Vec<u8>) -> Result<(), TypeError>

source

pub fn cast(self, to: &LogicalType) -> Result<DataValue, TypeError>

Trait Implementations§

source§

impl Clone for DataValue

source§

fn clone(&self) -> DataValue

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DataValue

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for DataValue

source§

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 Display for DataValue

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<&Value> for DataValue

source§

fn from(v: &Value) -> Self

Converts to this type from the input type.
source§

impl From<Option<String>> for DataValue

source§

fn from(value: Option<String>) -> Self

Converts to this type from the input type.
source§

impl From<Option<bool>> for DataValue

source§

fn from(value: Option<bool>) -> Self

Converts to this type from the input type.
source§

impl From<Option<f32>> for DataValue

source§

fn from(value: Option<f32>) -> Self

Converts to this type from the input type.
source§

impl From<Option<f64>> for DataValue

source§

fn from(value: Option<f64>) -> Self

Converts to this type from the input type.
source§

impl From<Option<i16>> for DataValue

source§

fn from(value: Option<i16>) -> Self

Converts to this type from the input type.
source§

impl From<Option<i32>> for DataValue

source§

fn from(value: Option<i32>) -> Self

Converts to this type from the input type.
source§

impl From<Option<i64>> for DataValue

source§

fn from(value: Option<i64>) -> Self

Converts to this type from the input type.
source§

impl From<Option<i8>> for DataValue

source§

fn from(value: Option<i8>) -> Self

Converts to this type from the input type.
source§

impl From<Option<u16>> for DataValue

source§

fn from(value: Option<u16>) -> Self

Converts to this type from the input type.
source§

impl From<Option<u32>> for DataValue

source§

fn from(value: Option<u32>) -> Self

Converts to this type from the input type.
source§

impl From<Option<u64>> for DataValue

source§

fn from(value: Option<u64>) -> Self

Converts to this type from the input type.
source§

impl From<Option<u8>> for DataValue

source§

fn from(value: Option<u8>) -> Self

Converts to this type from the input type.
source§

impl From<String> for DataValue

source§

fn from(value: String) -> Self

Converts to this type from the input type.
source§

impl From<bool> for DataValue

source§

fn from(value: bool) -> Self

Converts to this type from the input type.
source§

impl From<f32> for DataValue

source§

fn from(value: f32) -> Self

Converts to this type from the input type.
source§

impl From<f64> for DataValue

source§

fn from(value: f64) -> Self

Converts to this type from the input type.
source§

impl From<i16> for DataValue

source§

fn from(value: i16) -> Self

Converts to this type from the input type.
source§

impl From<i32> for DataValue

source§

fn from(value: i32) -> Self

Converts to this type from the input type.
source§

impl From<i64> for DataValue

source§

fn from(value: i64) -> Self

Converts to this type from the input type.
source§

impl From<i8> for DataValue

source§

fn from(value: i8) -> Self

Converts to this type from the input type.
source§

impl From<u16> for DataValue

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl From<u32> for DataValue

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl From<u64> for DataValue

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl From<u8> for DataValue

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl Hash for DataValue

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for DataValue

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for DataValue

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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 more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for DataValue

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for DataValue

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,