pub struct GnssWeek {
pub week: Week,
pub seconds_of_week: Second,
pub subsecond_nanos: Nanosecond,
}Expand description
Decomposed GNSS week-number form.
Fields§
§week: WeekFull week number since the constellation’s defined epoch (no rollover).
seconds_of_week: SecondSeconds since the start of week in [0, 604800).
subsecond_nanos: NanosecondSubsecond nanoseconds remainder in [0, 1_000_000_000).
Implementations§
Source§impl GnssWeek
impl GnssWeek
Sourcepub fn new(
week: Week,
seconds_of_week: Second,
subsecond_nanos: Nanosecond,
) -> Result<Self, ConversionError>
pub fn new( week: Week, seconds_of_week: Second, subsecond_nanos: Nanosecond, ) -> Result<Self, ConversionError>
Construct, validating ranges.
Sourcepub fn subsecond_nanoseconds_u(&self) -> Nanosecond
pub fn subsecond_nanoseconds_u(&self) -> Nanosecond
Return the subsecond nanoseconds remainder as a typed unsigned integer quantity.
The returned value is always in [0, 1_000_000_000) nanoseconds.
Sourcepub fn seconds_of_week_u(&self) -> Second
pub fn seconds_of_week_u(&self) -> Second
Return the seconds since the start of the week as a typed unsigned integer quantity.
The returned value is always in [0, 604_800) seconds.
Sourcepub fn new_with_nanoseconds_u(
week: Week,
seconds_of_week: Second,
subsecond: Nanosecond,
) -> Result<Self, ConversionError>
pub fn new_with_nanoseconds_u( week: Week, seconds_of_week: Second, subsecond: Nanosecond, ) -> Result<Self, ConversionError>
Construct from a typed unsigned nanosecond quantity.
Rejects values ≥ 1 × 10⁹ ns.
Sourcepub fn to_duration_since_epoch(&self) -> ExactDuration
pub fn to_duration_since_epoch(&self) -> ExactDuration
Convert back to a total ExactDuration since the scale’s epoch.
Trait Implementations§
impl Copy for GnssWeek
impl Eq for GnssWeek
impl StructuralPartialEq for GnssWeek
Auto Trait Implementations§
impl Freeze for GnssWeek
impl RefUnwindSafe for GnssWeek
impl Send for GnssWeek
impl Sync for GnssWeek
impl Unpin for GnssWeek
impl UnsafeUnpin for GnssWeek
impl UnwindSafe for GnssWeek
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.