pub enum ToonError {
JsonParse(Error),
ToonParse {
line: usize,
message: String,
},
Encode(String),
}Expand description
Errors that can occur during TOON encoding or decoding.
Variants§
JsonParse(Error)
The input string was not valid JSON (encoding path).
ToonParse
The input string was not valid TOON (decoding path). Includes the 1-based line number where the error was detected.
Encode(String)
A structural error during encoding (e.g., unsupported value type).
Trait Implementations§
Source§impl Error for ToonError
impl Error for ToonError
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()
Auto Trait Implementations§
impl Freeze for ToonError
impl !RefUnwindSafe for ToonError
impl Send for ToonError
impl Sync for ToonError
impl Unpin for ToonError
impl UnsafeUnpin for ToonError
impl !UnwindSafe for ToonError
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