pub enum Warning {
CantInferTimezoneFromCountry(&'static str),
ContainsEscapeCodes,
Country(Warning),
Decode(Warning),
InvalidTimezone,
LocationCountryShouldBeAlpha3,
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.
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.
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
Mutably borrows from an owned value. Read more
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,
Any type can be converted to
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>
If a
FromSchema is infallible a Caveat can be created using this method.