pub enum WarningKind {
ControlCharacterWhileParsingString(usize),
DecodeUtf16(usize, u16),
InvalidEscape(usize),
UnexpectedEndOfString(usize),
}
Expand description
The kind of Warning
that can happen when decoding a &str
.
Variants§
ControlCharacterWhileParsingString(usize)
Control chars were found while parsing a JSON string.
DecodeUtf16(usize, u16)
A UTF-16 surrogate pair failed to decode.
InvalidEscape(usize)
A string contains invalid escape chars.
UnexpectedEndOfString(usize)
The String ended before the parser expected.
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(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(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
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
.