pub struct GapInfo {
pub begin: Option<(NaiveDateTime, TzOffset)>,
pub end: Option<DateTime<Tz>>,
}
Expand description
Represents the information of a gap.
This returns useful information that can be used when converting a local NaiveDateTime
to a timezone-aware DateTime
with TimeZone::from_local_datetime
and a gap
(LocalResult::None
) is found.
Fields§
§begin: Option<(NaiveDateTime, TzOffset)>
When available it contains information about the beginning of the gap.
The time represents the first instant in which the gap starts.
This means that it is the first instant that when used with TimeZone::from_local_datetime
it will return LocalResult::None
.
The offset represents the offset of the first instant before the gap.
end: Option<DateTime<Tz>>
When available it contains the first instant after the gap.
Implementations§
Auto Trait Implementations§
impl Freeze for GapInfo
impl RefUnwindSafe for GapInfo
impl Send for GapInfo
impl Sync for GapInfo
impl Unpin for GapInfo
impl UnwindSafe for GapInfo
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