Enum serde_json_fmt::JsonSyntaxError
source · pub enum JsonSyntaxError {
InvalidCharacter(char),
MissingSeparator(char),
MultipleSeparators(char),
}
Expand description
Error returned when an invalid string is passed to certain JsonFormat
methods.
Variants§
InvalidCharacter(char)
Returned when the given string contains an invalid/unexpected character. Contains the character in question.
MissingSeparator(char)
Retured when a string passed to JsonFormat::comma()
or
JsonFormat::colon()
does not contain a comma or colon,
respectively. Contains a comma or colon as appropriate.
MultipleSeparators(char)
Retured when a string passed to JsonFormat::comma()
or
JsonFormat::colon()
contains more than one comma or colon,
respectively. Contains a comma or colon as appropriate.
Trait Implementations§
source§impl Clone for JsonSyntaxError
impl Clone for JsonSyntaxError
source§fn clone(&self) -> JsonSyntaxError
fn clone(&self) -> JsonSyntaxError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for JsonSyntaxError
impl Debug for JsonSyntaxError
source§impl Display for JsonSyntaxError
impl Display for JsonSyntaxError
source§impl Error for JsonSyntaxError
impl Error for JsonSyntaxError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl Hash for JsonSyntaxError
impl Hash for JsonSyntaxError
source§impl PartialEq<JsonSyntaxError> for JsonSyntaxError
impl PartialEq<JsonSyntaxError> for JsonSyntaxError
source§fn eq(&self, other: &JsonSyntaxError) -> bool
fn eq(&self, other: &JsonSyntaxError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.