pub enum Data {
Show 18 variants
Int(i32),
Long(i64),
Float(f32),
Double(f64),
Boolean(bool),
Timestamp(DateTime<Utc>),
String(String),
Json(Value),
Bytes(Vec<u8>),
IntArray(Vec<i32>),
LongArray(Vec<i64>),
FloatArray(Vec<f32>),
DoubleArray(Vec<f64>),
BooleanArray(Vec<bool>),
TimestampArray(Vec<DateTime<Utc>>),
StringArray(Vec<String>),
BytesArray(Vec<Vec<u8>>),
Null(DataType),
}
Expand description
Typed Pinot data
Variants§
Int(i32)
Long(i64)
Float(f32)
Double(f64)
Boolean(bool)
Timestamp(DateTime<Utc>)
String(String)
Json(Value)
Bytes(Vec<u8>)
IntArray(Vec<i32>)
LongArray(Vec<i64>)
FloatArray(Vec<f32>)
DoubleArray(Vec<f64>)
BooleanArray(Vec<bool>)
TimestampArray(Vec<DateTime<Utc>>)
StringArray(Vec<String>)
BytesArray(Vec<Vec<u8>>)
Null(DataType)
Implementations§
Source§impl Data
impl Data
pub fn data_type(&self) -> DataType
Sourcepub fn get_double(&self) -> Result<f64>
pub fn get_double(&self) -> Result<f64>
Returns as double
Sourcepub fn get_boolean(&self) -> Result<bool>
pub fn get_boolean(&self) -> Result<bool>
Returns as boolean
Sourcepub fn get_timestamp(&self) -> Result<DateTime<Utc>>
pub fn get_timestamp(&self) -> Result<DateTime<Utc>>
Returns as time stamp (i64
where 0 is 1970-01-01 00:00:00…)
Sourcepub fn get_string(&self) -> Result<&str>
pub fn get_string(&self) -> Result<&str>
Returns as string
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Data
impl<'de> Deserialize<'de> for Data
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
impl StructuralPartialEq for Data
Auto Trait Implementations§
impl Freeze for Data
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnwindSafe for Data
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