pub enum WarningKind {
ContainsEscapeCodes,
Decode(WarningKind),
Invalid(String),
InvalidType,
}Expand description
The warnings that can happen when parsing or linting a NaiveDate, NaiveTime, or DateTime.
Variants§
ContainsEscapeCodes
The datetime does not need to contain escape codes.
Decode(WarningKind)
The field at the path could not be decoded.
Invalid(String)
The datetime is not valid.
Timestamps are formatted as a string with a max length of 25 chars. Each timestamp follows RFC 3339, with some additional limitations. All timestamps are expected to be in UTC. The absence of the timezone designator implies a UTC timestamp. Fractional seconds may be used.
§Examples
Example of how timestamps should be formatted in OCPI, other formats/patterns are not allowed:
"2015-06-29T20:39:09Z""2015-06-29T20:39:09""2016-12-29T17:45:09.2Z""2016-12-29T17:45:09.2""2018-01-01T01:08:01.123Z""2018-01-01T01:08:01.123"
InvalidType
The JSON value given is not a string.
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
Converts to this type from the input type.
Source§impl From<WarningKind> for WarningKind
impl From<WarningKind> for WarningKind
Source§fn from(kind: WarningKind) -> Self
fn from(kind: WarningKind) -> Self
Converts to this type from the input type.
Source§impl From<WarningKind> for WarningKind
impl From<WarningKind> for WarningKind
Source§fn from(warn_kind: WarningKind) -> Self
fn from(warn_kind: WarningKind) -> Self
Converts to this type from the input type.
Source§impl Kind for WarningKind
impl Kind for WarningKind
Source§impl Ord for WarningKind
impl Ord for WarningKind
Source§fn cmp(&self, other: &WarningKind) -> Ordering
fn cmp(&self, other: &WarningKind) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for WarningKind
impl PartialEq for WarningKind
Source§impl PartialOrd for WarningKind
impl PartialOrd for WarningKind
impl Eq for WarningKind
impl StructuralPartialEq for WarningKind
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
Mutably borrows from an owned value. Read more