pub enum WarningKind {
Show 14 variants
CantInferTimezoneFromCountry(&'static str),
ContainsEscapeCodes,
Country(WarningKind),
Decode(WarningKind),
Deserialize(ParseError),
InvalidLocationType,
InvalidTimezone,
InvalidTimezoneType,
LocationCountryShouldBeAlpha3,
NoLocationCountry,
NoLocation,
Parser(Error),
ShouldBeAnObject,
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(WarningKind)
The CDR location is not a valid ISO 3166-1 alpha-3 code.
Decode(WarningKind)
The field at the path could not be decoded.
Deserialize(ParseError)
An error occurred while deserializing the CDR.
InvalidLocationType
The CDR location is not a String.
InvalidTimezone
The CDR location did not contain a valid IANA time-zone.
InvalidTimezoneType
The CDR timezone is not a String.
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.
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.
Parser(Error)
An Error occurred while parsing the JSON or deferred JSON String decode.
ShouldBeAnObject
Both the CDR and tariff JSON should be an Object.
V221CdrHasLocationField
A v221 CDR is given but it contains a location field instead of a cdr_location as defined in the spec.