pub enum TemporalValue {
Date {
days_since_epoch: i32,
},
LocalTime {
nanos_since_midnight: i64,
},
Time {
nanos_since_midnight: i64,
offset_seconds: i32,
},
LocalDateTime {
nanos_since_epoch: i64,
},
DateTime {
nanos_since_epoch: i64,
offset_seconds: i32,
timezone_name: Option<String>,
},
Duration {
months: i64,
days: i64,
nanos: i64,
},
}Expand description
Typed temporal value representation.
Stores temporal values in their native numeric form for O(1) comparisons
and direct Arrow column construction, with Cypher formatting applied only
at the output boundary via std::fmt::Display.
Variants§
Date
Date: days since Unix epoch (1970-01-01). Arrow: Date32.
LocalTime
Local time (no timezone): nanoseconds since midnight. Arrow: Time64(ns).
Time
Time with timezone offset: nanoseconds since midnight + offset. Arrow: Time64(ns) + metadata.
LocalDateTime
Local datetime (no timezone): nanoseconds since Unix epoch. Arrow: Timestamp(ns, None).
DateTime
Datetime with timezone: nanoseconds since Unix epoch (UTC) + offset + optional tz name. Arrow: Timestamp(ns, Some(“UTC”)).
Duration
Duration with calendar semantics: months + days + nanoseconds. Matches Cypher’s duration model which preserves calendar components.
Implementations§
Source§impl TemporalValue
impl TemporalValue
Sourcepub fn temporal_type(&self) -> TemporalType
pub fn temporal_type(&self) -> TemporalType
Returns the temporal type classification.
Sourcepub fn month(&self) -> Option<i64>
pub fn month(&self) -> Option<i64>
Month component (1-12), or None for time-only/duration types.
Sourcepub fn day(&self) -> Option<i64>
pub fn day(&self) -> Option<i64>
Day-of-month component (1-31), or None for time-only/duration types.
Sourcepub fn millisecond(&self) -> Option<i64>
pub fn millisecond(&self) -> Option<i64>
Millisecond sub-second component (0-999), or None for date-only types.
Sourcepub fn microsecond(&self) -> Option<i64>
pub fn microsecond(&self) -> Option<i64>
Microsecond sub-second component (0-999_999), or None for date-only types.
Sourcepub fn nanosecond(&self) -> Option<i64>
pub fn nanosecond(&self) -> Option<i64>
Nanosecond sub-second component (0-999_999_999), or None for date-only types.
Sourcepub fn week(&self) -> Option<i64>
pub fn week(&self) -> Option<i64>
ISO week number (1-53), or None for time-only/duration types.
Sourcepub fn ordinal_day(&self) -> Option<i64>
pub fn ordinal_day(&self) -> Option<i64>
Ordinal day of year (1-366), or None for time-only/duration types.
Sourcepub fn day_of_week(&self) -> Option<i64>
pub fn day_of_week(&self) -> Option<i64>
ISO day of week (Monday=1, Sunday=7), or None for time-only/duration types.
Sourcepub fn day_of_quarter(&self) -> Option<i64>
pub fn day_of_quarter(&self) -> Option<i64>
Day of quarter (1-92), or None for time-only/duration types.
Sourcepub fn offset_minutes(&self) -> Option<i64>
pub fn offset_minutes(&self) -> Option<i64>
Offset in minutes.
Sourcepub fn offset_seconds_value(&self) -> Option<i64>
pub fn offset_seconds_value(&self) -> Option<i64>
Offset in seconds.
Sourcepub fn epoch_seconds(&self) -> Option<i64>
pub fn epoch_seconds(&self) -> Option<i64>
Epoch seconds (for datetime/localdatetime types).
Sourcepub fn epoch_millis(&self) -> Option<i64>
pub fn epoch_millis(&self) -> Option<i64>
Epoch milliseconds (for datetime/localdatetime types).
Trait Implementations§
Source§impl Clone for TemporalValue
impl Clone for TemporalValue
Source§fn clone(&self) -> TemporalValue
fn clone(&self) -> TemporalValue
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TemporalValue
impl Debug for TemporalValue
Source§impl<'de> Deserialize<'de> for TemporalValue
impl<'de> Deserialize<'de> for TemporalValue
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>,
Source§impl Display for TemporalValue
impl Display for TemporalValue
Source§impl Hash for TemporalValue
impl Hash for TemporalValue
Source§impl PartialEq for TemporalValue
impl PartialEq for TemporalValue
Source§impl Serialize for TemporalValue
impl Serialize for TemporalValue
impl Eq for TemporalValue
impl StructuralPartialEq for TemporalValue
Auto Trait Implementations§
impl Freeze for TemporalValue
impl RefUnwindSafe for TemporalValue
impl Send for TemporalValue
impl Sync for TemporalValue
impl Unpin for TemporalValue
impl UnsafeUnpin for TemporalValue
impl UnwindSafe for TemporalValue
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
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
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.