pub enum Warning {
CantInferTimezoneFromCountry(&'static str),
ContainsEscapeCodes,
Country(Warning),
Decode(Warning),
InvalidLocationType,
InvalidTimezone,
InvalidTimezoneType,
LocationCountryShouldBeAlpha3,
NoLocationCountry,
NoLocation,
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(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.
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.
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§
Auto Trait Implementations§
impl Freeze for Warning
impl RefUnwindSafe for Warning
impl Send for Warning
impl Sync for Warning
impl Unpin for Warning
impl UnsafeUnpin for Warning
impl UnwindSafe for Warning
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<T> IntoCaveat for T
impl<T> IntoCaveat for T
Source§fn into_caveat<W>(self, warnings: Set<W>) -> Caveat<T, W>where
W: Warning,
fn into_caveat<W>(self, warnings: Set<W>) -> Caveat<T, W>where
W: Warning,
Caveat<T> by supplying a list of Warnings.Source§fn into_infallible_caveat(self) -> Caveat<Self, Infallible>
fn into_infallible_caveat(self) -> Caveat<Self, Infallible>
FromSchema is infallible a Caveat can be created using this method.