Timestamp#
- pub struct Timestamp#
How timestamps are encoded in a file, plus which column holds them.
Use
Timestamp::iso8601,Timestamp::epoch,Timestamp::custom, orTimestamp::relativeto construct one.
Implementations#
- impl Timestamp
-
- pub fn epoch(series_name: impl Into<String>, unit: TimeUnit) -> Self#
Timestamps are numeric epochs in the given unit (e.g. epoch-seconds).
- pub fn custom(series_name: impl Into<String>, format: impl Into<String>) -> Self#
Timestamps use a custom format string (Java
DateTimeFormattersyntax).
- pub fn relative(series_name: impl Into<String>, unit: TimeUnit) -> Self#
Timestamps are numeric offsets in the given unit relative to a start time. Use
Self::with_offsetto set the start time (required when ingesting into an existing dataset).
- pub fn with_offset(self, offset: DateTime<Utc>) -> Self#
Set the starting offset for a relative timestamp.
- pub fn with_default_year(self, year: i32) -> Self#
Set a default year for custom-format timestamps that lack year information (e.g. IRIG). No-op for other kinds.
- pub fn with_default_day_of_year(self, day: i32) -> Self#
Set a default day-of-year for custom-format timestamps that lack date information. No-op for other kinds.
Trait implementations#
Auto traits: Send, Sync, Unpin, UnwindSafe, RefUnwindSafe