pub struct Time {
pub unit: TimeUnit,
pub bit_width: i32,
}Expand description
Time is either a 32-bit or 64-bit signed integer type representing an elapsed time since midnight, stored in either of four units: seconds, milliseconds, microseconds or nanoseconds.
The integer bitWidth depends on the unit and must be one of the following:
- SECOND and MILLISECOND: 32 bits
- MICROSECOND and NANOSECOND: 64 bits
The allowed values are between 0 (inclusive) and 86400 (=246060) seconds (exclusive), adjusted for the time unit (for example, up to 86400000 exclusive for the MILLISECOND unit). This definition doesn’t allow for leap seconds. Time values from measurements with leap seconds will need to be corrected when ingesting into Arrow (for example by replacing the value 86400 with 86399).
Generated from these locations:
- Table
Timein the fileSchema.fbs:272
Fields§
§unit: TimeUnitThe field unit in the table Time
bit_width: i32The field bitWidth in the table Time
Implementations§
Source§impl Time
impl Time
Sourcepub fn builder() -> TimeBuilder<()>
pub fn builder() -> TimeBuilder<()>
Creates a TimeBuilder for serializing an instance of this table.
pub fn create( builder: &mut Builder, field_unit: impl WriteAsDefault<TimeUnit, TimeUnit>, field_bit_width: impl WriteAsDefault<i32, i32>, ) -> Offset<Self>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Time
impl<'de> Deserialize<'de> for Time
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 Ord for Time
impl Ord for Time
Source§impl PartialOrd for Time
impl PartialOrd for Time
impl Eq for Time
impl StructuralPartialEq for Time
impl VectorWrite<Offset<Time>> for Time
§Safety
The planus compiler generates implementations that initialize
the bytes in write_values.
impl WriteAs<Offset<Time>> for Time
impl WriteAsOffset<Time> for Time
impl<T0: WriteAsDefault<TimeUnit, TimeUnit>, T1: WriteAsDefault<i32, i32>> WriteAsOffset<Time> for TimeBuilder<(T0, T1)>
impl WriteAsOptional<Offset<Time>> for Time
Auto Trait Implementations§
impl Freeze for Time
impl RefUnwindSafe for Time
impl Send for Time
impl Sync for Time
impl Unpin for Time
impl UnwindSafe for Time
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> Comparable<K> for Q
impl<Q, K> Comparable<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> 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 more