pub enum TimePeriod {
Year,
Month,
Week,
Day,
Hour,
Minute,
Second,
Millisecond,
Microsecond,
}Expand description
§TimePeriod
Calendar granularity for internal datetime mechanics such as truncation and flooring.
§Role
TimePeriod names the granularity a datetime is floored to, for example flooring
to the start of the month. It drives the internal date arithmetic in
DatetimeArray and is not part of the Apache Arrow type system.
For stored resolution and FFI, use TimeUnit instead - that is the Apache Arrow
and FFI-compatible unit carried on Field and ArrowType. TimePeriod is a
distinct concept: it names a calendar step, not the resolution of a stored value.
§String form
Each variant has a canonical lower-case label (year, month, week, day,
hour, minute, second, millisecond, microsecond). A TimePeriod converts
to and from that label, so a call site can pass either the variant or its string.
Parse an untrusted string with str::parse (via FromStr) to get a Result -
the From<&str> path panics on an unknown label and is for known-good literals.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for TimePeriod
impl Clone for TimePeriod
Source§fn clone(&self) -> TimePeriod
fn clone(&self) -> TimePeriod
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TimePeriod
Source§impl Debug for TimePeriod
impl Debug for TimePeriod
Source§impl Display for TimePeriod
impl Display for TimePeriod
impl Eq for TimePeriod
Source§impl From<&str> for TimePeriod
impl From<&str> for TimePeriod
Source§impl FromStr for TimePeriod
impl FromStr for TimePeriod
Source§impl Hash for TimePeriod
impl Hash for TimePeriod
Source§impl PartialEq for TimePeriod
impl PartialEq for TimePeriod
Source§fn eq(&self, other: &TimePeriod) -> bool
fn eq(&self, other: &TimePeriod) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TimePeriod
Auto Trait Implementations§
impl Freeze for TimePeriod
impl RefUnwindSafe for TimePeriod
impl Send for TimePeriod
impl Sync for TimePeriod
impl Unpin for TimePeriod
impl UnsafeUnpin for TimePeriod
impl UnwindSafe for TimePeriod
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CustomValue for T
impl<T> CustomValue for T
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> Key for Twhere
T: Clone,
impl<T> Key for Twhere
T: Clone,
impl<T> PlanCallbackArgs for T
impl<T> PlanCallbackOut for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more