#[non_exhaustive]pub enum ExtractionError {
JsonParse(Error),
Internal(String),
}Expand description
Fatal extraction errors that prevent further processing.
Most extraction issues are captured as ExtractionWarnings instead.
This enum is reserved for errors that make it impossible to produce
any meaningful output.
§Examples
use schemaorg_rs::error::ExtractionError;
let err = ExtractionError::Internal("unexpected state".into());
assert_eq!(err.to_string(), "extraction failed: unexpected state");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.
JsonParse(Error)
A JSON-LD script body contained invalid JSON.
Note: This variant is available for library consumers who parse JSON-LD outside the extractor pipeline. The built-in extractors convert JSON parse failures into warnings instead.
Internal(String)
An internal error occurred during extraction.
Trait Implementations§
Source§impl Debug for ExtractionError
impl Debug for ExtractionError
Source§impl Display for ExtractionError
impl Display for ExtractionError
Source§impl Error for ExtractionError
impl Error for ExtractionError
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 ExtractionError
impl !RefUnwindSafe for ExtractionError
impl Send for ExtractionError
impl Sync for ExtractionError
impl Unpin for ExtractionError
impl UnsafeUnpin for ExtractionError
impl !UnwindSafe for ExtractionError
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