pub struct ReferenceTime {
pub year: u16,
pub month: u8,
pub day: u8,
pub hour: u8,
pub minute: u8,
pub second: u8,
}Expand description
Common reference time representation for GRIB fields.
Fields§
§year: u16§month: u8§day: u8§hour: u8§minute: u8§second: u8Implementations§
Source§impl ReferenceTime
impl ReferenceTime
Sourcepub fn checked_add_forecast_time_unit(
&self,
unit: ForecastTimeUnit,
value: u32,
) -> Option<ReferenceTime>
pub fn checked_add_forecast_time_unit( &self, unit: ForecastTimeUnit, value: u32, ) -> Option<ReferenceTime>
Add a GRIB forecast lead using a semantic forecast-time unit.
Returns None for calendar-dependent units or invalid timestamps.
Sourcepub fn checked_add_forecast_time_by_edition(
&self,
edition: u8,
unit: u8,
value: u32,
) -> Option<ReferenceTime>
pub fn checked_add_forecast_time_by_edition( &self, edition: u8, unit: u8, value: u32, ) -> Option<ReferenceTime>
Add a GRIB forecast lead using raw GRIB edition and unit-code values.
Returns None for unsupported edition/code pairs, calendar-dependent
units, or invalid timestamps.
Sourcepub fn checked_add_forecast_time(
&self,
unit: u8,
value: u32,
) -> Option<ReferenceTime>
pub fn checked_add_forecast_time( &self, unit: u8, value: u32, ) -> Option<ReferenceTime>
Add a GRIB forecast lead using raw GRIB2 Code Table 4.4 units.
Returns None for unsupported unit codes, calendar-dependent units, or
invalid timestamps.
Trait Implementations§
Source§impl Clone for ReferenceTime
impl Clone for ReferenceTime
Source§fn clone(&self) -> ReferenceTime
fn clone(&self) -> ReferenceTime
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReferenceTime
impl Debug for ReferenceTime
Source§impl PartialEq for ReferenceTime
impl PartialEq for ReferenceTime
impl Copy for ReferenceTime
impl Eq for ReferenceTime
impl StructuralPartialEq for ReferenceTime
Auto Trait Implementations§
impl Freeze for ReferenceTime
impl RefUnwindSafe for ReferenceTime
impl Send for ReferenceTime
impl Sync for ReferenceTime
impl Unpin for ReferenceTime
impl UnsafeUnpin for ReferenceTime
impl UnwindSafe for ReferenceTime
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<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>
Converts
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>
Converts
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