#[non_exhaustive]pub enum JsonPrettyErrorKind {
Syntax,
OutputLimit,
Capacity,
Io,
}Expand description
Stable category for a token formatting failure.
The category distinguishes invalid input, output limits, capacity failures, and write failures without exposing implementation-specific details.
§Examples
use qubit_json::format::JsonPrettyErrorKind;
let kind = JsonPrettyErrorKind::Syntax;
assert_eq!(kind.to_string(), "invalid JSON syntax");Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Syntax
The input is not one complete syntactically valid JSON value.
OutputLimit
The formatted bytes exceed the caller-provided maximum.
Capacity
Checked length arithmetic or allocation could not be completed.
Io
The output rejected a write; an accepted prefix may remain.
Trait Implementations§
Source§impl Clone for JsonPrettyErrorKind
impl Clone for JsonPrettyErrorKind
impl Copy for JsonPrettyErrorKind
Source§impl Debug for JsonPrettyErrorKind
impl Debug for JsonPrettyErrorKind
Source§impl Display for JsonPrettyErrorKind
impl Display for JsonPrettyErrorKind
Source§fn fmt(&self, formatter: &mut Formatter<'_>) -> Result
fn fmt(&self, formatter: &mut Formatter<'_>) -> Result
Writes the stable human-readable description of this failure category.
§Parameters
formatter— the output formatter receiving the description. Formatting stops if it reports a write error.
§Returns
Returns Ok(()) after writing the description, or the formatter’s
error if the output sink rejects the write.
impl Eq for JsonPrettyErrorKind
Source§impl Hash for JsonPrettyErrorKind
impl Hash for JsonPrettyErrorKind
Source§impl PartialEq for JsonPrettyErrorKind
impl PartialEq for JsonPrettyErrorKind
impl StructuralPartialEq for JsonPrettyErrorKind
Auto Trait Implementations§
impl Forget for JsonPrettyErrorKind
impl Freeze for JsonPrettyErrorKind
impl Move for JsonPrettyErrorKind
impl RefUnwindSafe for JsonPrettyErrorKind
impl Send for JsonPrettyErrorKind
impl Sync for JsonPrettyErrorKind
impl Unpin for JsonPrettyErrorKind
impl UnsafeUnpin for JsonPrettyErrorKind
impl UnwindSafe for JsonPrettyErrorKind
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