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,
}
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.
Trait Implementations§
Source§impl Debug for WarningKind
impl Debug for WarningKind
Source§impl Display for WarningKind
impl Display for WarningKind
Source§impl From<WarningKind> for WarningKind
impl From<WarningKind> for WarningKind
Source§fn from(warn_kind: WarningKind) -> Self
fn from(warn_kind: WarningKind) -> Self
Source§impl From<WarningKind> for WarningKind
impl From<WarningKind> for WarningKind
Source§fn from(warn_kind: WarningKind) -> Self
fn from(warn_kind: WarningKind) -> Self
Auto Trait Implementations§
impl Freeze for WarningKind
impl !RefUnwindSafe for WarningKind
impl Send for WarningKind
impl Sync for WarningKind
impl Unpin for WarningKind
impl !UnwindSafe for WarningKind
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<K> IntoWarning<K> for Kwhere
K: Kind,
impl<K> IntoWarning<K> for Kwhere
K: Kind,
Source§fn into_warning(self, elem: &Element<'_>) -> Warning<K>
fn into_warning(self, elem: &Element<'_>) -> Warning<K>
Convert a Kind
into a Warning
by supplying a json::Element
.