Enum AmbiguousOffset
pub enum AmbiguousOffset
A possibly ambiguous Offset.
One of three possibilities encoded by this type occurs when converting a civil datetime into a specific instant in time. In rare cases, the civil datetime can fall into a gap or a fold, in which case, one of two offsets could be applicable. Or, perhaps, neither. Callers must decide how best to handle these cases.
Variants
-
Unambiguous { offset: Offset } The offset for a particular civil datetime and time zone is unambiguous.
This is the overwhelmingly common case. In general, the only time this case does not occur is when there is a transition to a different time zone (rare) or to/from daylight saving time (occurs for 1 hour twice in year in many geographic locations).
-
Gap { before: Offset, after: Offset } The offset for a particular civil datetime and time zone is ambiguous because there is a gap.
This most commonly occurs when a civil datetime corresponds to an hour that was "skipped" in a jump to DST (daylight saving time).
-
Fold { before: Offset, after: Offset } The offset for a particular civil datetime and time zone is ambiguous because there is a fold.
This most commonly occurs when a civil datetime corresponds to an hour that was "repeated" in a jump to standard time from DST (daylight saving time).
Trait Implementations
impl Clone for AmbiguousOffset
fn clone(&self) -> Self
impl Copy for AmbiguousOffset
impl Debug for AmbiguousOffset
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for AmbiguousOffset
impl PartialEq for AmbiguousOffset
fn eq(&self, other: &Self) -> bool