pub struct DateTime(pub Tz, pub u32);Expand description
Wrapper type for ClickHouse DateTime type.
Tuple Fields§
§0: Tz§1: u32Implementations§
Source§impl DateTime
impl DateTime
Sourcepub fn from_chrono_infallible(other: DateTime<Tz>) -> Self
pub fn from_chrono_infallible(other: DateTime<Tz>) -> Self
Infallible from implemenation for chrono::DateTime<Tz>.
IMPORTANT: This will truncate a value that is too large for the target type.
Use TryFrom for the fallible version.
Sourcepub fn from_chrono_infallible_utc(other: DateTime<Utc>) -> Self
pub fn from_chrono_infallible_utc(other: DateTime<Utc>) -> Self
Infallible from implemenation for chrono::DateTime<Utc>.
IMPORTANT: This will truncate a value that is too large for the target type.
Use TryFrom for the fallible version.
Sourcepub fn from_seconds(seconds: i64, tz: Option<Arc<str>>) -> Self
pub fn from_seconds(seconds: i64, tz: Option<Arc<str>>) -> Self
§Panics
Panics if the number of seconds is out of range for a u32.
Sourcepub fn from_millis(ms: i64, tz: Option<Arc<str>>) -> Self
pub fn from_millis(ms: i64, tz: Option<Arc<str>>) -> Self
§Panics
Panics if the number of milliseconds is out of range for a u32.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DateTime
impl<'de> Deserialize<'de> for DateTime
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl TryFrom<DateTime<FixedOffset>> for DateTime
impl TryFrom<DateTime<FixedOffset>> for DateTime
Source§type Error = TryFromIntError
type Error = TryFromIntError
The type returned in the event of a conversion error.
Source§fn try_from(other: DateTime<FixedOffset>) -> Result<Self, TryFromIntError>
fn try_from(other: DateTime<FixedOffset>) -> Result<Self, TryFromIntError>
Performs the conversion.
Source§impl TryFrom<DateTime> for DateTime<FixedOffset>
impl TryFrom<DateTime> for DateTime<FixedOffset>
Source§type Error = TryFromIntError
type Error = TryFromIntError
The type returned in the event of a conversion error.
Source§impl TryFrom<DateTime> for DateTime<Tz>
impl TryFrom<DateTime> for DateTime<Tz>
Source§type Error = TryFromIntError
type Error = TryFromIntError
The type returned in the event of a conversion error.
Source§impl TryFrom<DateTime> for DateTime<Utc>
impl TryFrom<DateTime> for DateTime<Utc>
Source§type Error = TryFromIntError
type Error = TryFromIntError
The type returned in the event of a conversion error.
impl Copy for DateTime
impl Eq for DateTime
impl StructuralPartialEq for DateTime
Auto Trait Implementations§
impl Freeze for DateTime
impl RefUnwindSafe for DateTime
impl Send for DateTime
impl Sync for DateTime
impl Unpin for DateTime
impl UnwindSafe for DateTime
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.