Enum taos_query::common::Timestamp
source · pub enum Timestamp {
Milliseconds(i64),
Microseconds(i64),
Nanoseconds(i64),
}Variants§
Implementations§
source§impl Timestamp
impl Timestamp
pub fn new(raw: i64, precision: Precision) -> Self
pub fn precision(&self) -> Precision
pub fn as_raw_i64(&self) -> i64
pub fn to_naive_datetime(&self) -> NaiveDateTime
pub fn to_datetime_with_tz(&self) -> DateTime<Local>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Timestamp
impl<'de> Deserialize<'de> for Timestamp
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