pub enum ToonError {
JsonError(Error),
ParseError {
line: usize,
message: String,
},
SerializeError(String),
InvalidTabularArray(String),
}Expand description
Errors that can occur during TOON-LD operations
Variants§
JsonError(Error)
Error parsing JSON input
ParseError
Error parsing TOON-LD input
Fields
SerializeError(String)
Error during serialization
InvalidTabularArray(String)
Invalid tabular array structure
Implementations§
Source§impl ToonError
impl ToonError
Sourcepub fn parse_error(line: usize, message: impl Into<String>) -> ToonError
pub fn parse_error(line: usize, message: impl Into<String>) -> ToonError
Create a new parse error at the given line
Sourcepub fn serialize_error(message: impl Into<String>) -> ToonError
pub fn serialize_error(message: impl Into<String>) -> ToonError
Create a new serialization error
Sourcepub fn invalid_tabular_array(message: impl Into<String>) -> ToonError
pub fn invalid_tabular_array(message: impl Into<String>) -> ToonError
Create a new invalid tabular array error
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 !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