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 duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const 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)>
Returns 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 for JsonSyntaxError
impl PartialEq for JsonSyntaxError
impl Copy for JsonSyntaxError
impl Eq for JsonSyntaxError
impl StructuralPartialEq for JsonSyntaxError
Auto Trait Implementations§
impl Freeze for JsonSyntaxError
impl RefUnwindSafe for JsonSyntaxError
impl Send for JsonSyntaxError
impl Sync for JsonSyntaxError
impl Unpin for JsonSyntaxError
impl UnwindSafe for JsonSyntaxError
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