pub enum Warning {
CantInferTimezoneFromCountry(&'static str),
ContainsEscapeCodes,
Country(Warning),
Decode(Warning),
InvalidTimezone,
LocationCountryShouldBeAlpha3,
MiscasedTimezone,
NoLocationCountry,
NoLocation,
V221CdrHasLocationField,
}Expand description
The warnings possible when parsing or linting an IANA timezone.
Variants§
CantInferTimezoneFromCountry(&'static str)
A timezone can’t be inferred from the location’s country.
ContainsEscapeCodes
Neither the timezone or country field require char escape codes.
Country(Warning)
The CDR location is not a valid ISO 3166-1 alpha-3 code.
Decode(Warning)
The field at the path could not be decoded.
InvalidTimezone
The CDR location did not contain a valid IANA time-zone.
LocationCountryShouldBeAlpha3
The location.country field should be an alpha-3 country code.
The alpha-2 code can be converted into an alpha-3 but the caller should be warned.
MiscasedTimezone
The time_zone names an IANA time zone in the wrong letter case, such as
europe/amsterdam for Europe/Amsterdam.
No two IANA names differ only in case, so find_or_infer still finds the time zone
and returns it as Source::Found.
NoLocationCountry
The CDR’s location has no country element and so the timezone can’t be inferred.
NoLocation
The CDR has no location element and so the timezone can’t be found or inferred.
V221CdrHasLocationField
A v221 CDR is given but it contains a location field instead of a cdr_location as defined in the spec.