pub enum TimezoneName {
Known(Tz),
Unrecognized(String),
}Expand description
A named time zone as VoIP.ms reports it: a parsed chrono_tz::Tz when
the bundled IANA database recognizes the name, or the verbatim wire string
when it does not.
VoIP.ms’s getTimezones reference catalog still lists a handful of legacy
names the IANA database has since dropped (Asia/Beijing,
US/Pacific-New, Factory, …), and a long-lived mailbox may carry one;
preserving them beats failing the whole response. Parsing never fails –
an unrecognized name lands in TimezoneName::Unrecognized and
round-trips unchanged.
Variants§
Known(Tz)
A zone the bundled IANA database recognizes.
Unrecognized(String)
A name it does not recognize, preserved verbatim.
Implementations§
Trait Implementations§
Source§impl Clone for TimezoneName
impl Clone for TimezoneName
Source§fn clone(&self) -> TimezoneName
fn clone(&self) -> TimezoneName
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TimezoneName
impl Debug for TimezoneName
Source§impl<'de> Deserialize<'de> for TimezoneName
impl<'de> Deserialize<'de> for TimezoneName
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for TimezoneName
impl Display for TimezoneName
impl Eq for TimezoneName
Source§impl From<Tz> for TimezoneName
impl From<Tz> for TimezoneName
Source§impl FromStr for TimezoneName
impl FromStr for TimezoneName
Source§impl Hash for TimezoneName
impl Hash for TimezoneName
Source§impl PartialEq for TimezoneName
impl PartialEq for TimezoneName
Source§impl Serialize for TimezoneName
impl Serialize for TimezoneName
impl StructuralPartialEq for TimezoneName
Auto Trait Implementations§
impl Freeze for TimezoneName
impl RefUnwindSafe for TimezoneName
impl Send for TimezoneName
impl Sync for TimezoneName
impl Unpin for TimezoneName
impl UnsafeUnpin for TimezoneName
impl UnwindSafe for TimezoneName
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