Expand description
§Module Structure
crate- Contains the baseTimestruct, describing a standardHours/minutes/secondsframework.datetime- ContainsUTCDateTimestructs, describing aDatewith aTimeepoch- ContainsEpoch,UnixEpoch,GPSEpoch, and others, providing the datum anchor for timestampsUnixTimestamp,GPSTimestamp, etc.gregorian- ContainsDateandMonth, that describe a gregorian calendar date.julian- ContainsJulianDateand it’s associated epochs.crate::format- ContainsFormatandFormatParserto tranlate dates to and from strings.crate::format::iso8601- ISO8601 Implementations ofDateFormatandDateFormatParser
The top level module Contains the various representations of Time
A Time is a specific time offset into a Day. Intended for use where Hour:Minute:Seconds are
needed.
The following are variants of epoch::Timestamp, with specific methods and sizes to
to represent the Duration against an Epoch. These follow the same binary format as the NTP
Timestamp format, if used with the NTP Epoch.
Modules§
- datetime
- Contains
UTCDateTimeand associated elements to represent aDateandTimein UTC - epoch
- Contains the concept of an
Epoch- a specific Proleptic GregorianDatefrom which aTimestampis measured against. - format
- Date Formatters
- gregorian
- Contains
Dateand associated elements to represent a Proleptic Gregorian Date. - julian
- Contains
JulianDateand others - ways of measuring a discrete amount of days from a specific JulianEpoch
Structs§
- Duration
- Greater
Than Equal ToValue Error - An error type to indicate that the checked value is greater than or equal to the valid reference value
- Less
Than Value - A
Rangeimplementation to verify a value is less than the reference value - Time
- Represents a time of the day, an offset into the day from midnight.
- Time32
- 32 Bit Fixed Precision Time Format, storing 16 bits of Seconds, and 16 bits
of Fractional Seconds. This is the equivalent of Q16.16, and is semantically
equivalent to the NTP Short Format if using the
epoch::NTP_EPOCH. - Time64
- 64 Bit Fixed Precision Time Format, storing 32 bits of Seconds, and 32 bits
of Fractional Seconds. This is the equivalent of Q32.32, and is semantically
equivalent to the NTP Timestamp Format if using the
epoch::NTP_EPOCH. - Time128
- 128 Bit Fixed Precision Time Format, storing 64 bits of Seconds, and 64 bits
of Fractional Seconds. This is the equivalent of Q64.64, and is semantically
equivalent to the NTP Datestamp Format if using the
epoch::NTP_EPOCH.
Enums§
- Duration
Unit - Represents a specific duration unit - SI or otherwise.
Constants§
- HOURS_
IN_ DAY - 24 Hours in a Day
- MINUTES_
IN_ DAY - 1440 Minutes in a Day
- MINUTES_
IN_ HOUR - 60 Minutes in an Hour
- NANOS_
IN_ DAY - Nanoseconds in a Day
- NANOS_
IN_ MICRO - Nanoseconds in a Microsecond
- NANOS_
IN_ MILLI - Nanoseconds in a Millisecond
- NANOS_
IN_ SECOND - Nanoseconds in a Second
- SECONDS_
IN_ DAY - Generally 86400, but occasionally 86401 for leap seconds.
- SECONDS_
IN_ HOUR - 3600 Seconds in an Hour
- SECONDS_
IN_ MINUTE - 60 Seconds in a Minute
Traits§
- Range
- A trait to check if a particular value is within range