pub enum TimeUnit {
Seconds,
Milliseconds,
Microseconds,
Nanoseconds,
Days,
}Expand description
§TimeUnit
Unified time unit enumeration.
§Purpose
- Combines time units for both
DatetimeArray32andDatetimeArray64. - Confirm time since epoch units, or a raw duration value (depending on the
ArrowTypethat’s attached toFieldduringFieldArrayconstruction). - Avoids proliferating variants that require explicit handling throughout match statements.
§Behaviour
- Unit values are stored on the
DatetimeArray, enabling variant-specific logic. - When transmitted over FFI, an
Apache Arrow- produces compatible native format.
Variants§
Seconds
Seconds for Apache Arrow Time32 and Time64 units.
Milliseconds
Milliseconds for Apache Arrow Time32 and Time64 units.
Microseconds
Microseconds for Apache Arrow Time32 and Time64 units.
Nanoseconds
Nanoseconds for Apache Arrow Time32 and Time64 units.
Days
Default = days unspecified
Apache Arrow’s Date32 and Date64 types use days implicitly.
Trait Implementations§
impl Copy for TimeUnit
impl Eq for TimeUnit
impl StructuralPartialEq for TimeUnit
Auto Trait Implementations§
impl Freeze for TimeUnit
impl RefUnwindSafe for TimeUnit
impl Send for TimeUnit
impl Sync for TimeUnit
impl Unpin for TimeUnit
impl UnsafeUnpin for TimeUnit
impl UnwindSafe for TimeUnit
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