#[non_exhaustive]pub enum Disambiguation {
Compatible,
Earlier,
Later,
Reject,
}Expand description
How a civil (wall-clock) time that does not map cleanly to an instant should be resolved.
This is the TimeZone::ambiguity companion used by
DateTime::from_parts_with.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Compatible
The default: in a gap shift the wall time forward, in a fold select the earlier of the two instants.
Earlier
Select the earliest instant. In a gap there is only the shifted
forward instant, so this is the same as Compatible there.
Later
Select the latest instant. In a gap there is only the shifted
forward instant, so this is the same as Compatible there.
Reject
Reject civil times that are ambiguous or that do not exist with
ErrorKind::Ambiguous.
Trait Implementations§
Source§impl Clone for Disambiguation
impl Clone for Disambiguation
impl Copy for Disambiguation
Source§impl Debug for Disambiguation
impl Debug for Disambiguation
impl Eq for Disambiguation
Source§impl Hash for Disambiguation
impl Hash for Disambiguation
Source§impl PartialEq for Disambiguation
impl PartialEq for Disambiguation
impl StructuralPartialEq for Disambiguation
Auto Trait Implementations§
impl Freeze for Disambiguation
impl RefUnwindSafe for Disambiguation
impl Send for Disambiguation
impl Sync for Disambiguation
impl Unpin for Disambiguation
impl UnsafeUnpin for Disambiguation
impl UnwindSafe for Disambiguation
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