pub enum FromLinkedDataError {
ExpectedIri(ContextIris),
UnsupportedIri {
context: ContextIris,
found: IriBuf,
supported: Option<Vec<IriBuf>>,
},
ExpectedLiteral(ContextIris),
LiteralTypeMismatch {
context: ContextIris,
expected: Option<Box<IriBuf>>,
found: Box<IriBuf>,
},
InvalidLiteral(ContextIris),
MissingRequiredValue(ContextIris),
TooManyValues(ContextIris),
InvalidSubject {
context: ContextIris,
subject: Option<IriBuf>,
},
}Expand description
Error raised while deserializing a value from Linked Data.
Variants§
ExpectedIri(ContextIris)
Resource has no IRI representation.
UnsupportedIri
Resource is identified by an IRI the type does not accept.
Fields
§
context: ContextIrisError context.
ExpectedLiteral(ContextIris)
Resource has no literal representation.
LiteralTypeMismatch
Resource has literal representations, but none of the expected type.
The type IRIs are boxed: this is the only variant carrying two of them, and inline they would make it the largest variant by a wide margin, which sets the size of the whole enum.
Fields
§
context: ContextIrisError context.
InvalidLiteral(ContextIris)
Resource has a literal representation of the correct type, but the lexical value could not be successfully parsed.
MissingRequiredValue(ContextIris)
Missing required value.
TooManyValues(ContextIris)
Too many values.
InvalidSubject
Generic error for invalid subjects.
Implementations§
Source§impl FromLinkedDataError
impl FromLinkedDataError
Sourcepub fn context(&self) -> &ContextIris
pub fn context(&self) -> &ContextIris
Returns the context in which this error was raised.
Trait Implementations§
Source§impl Debug for FromLinkedDataError
impl Debug for FromLinkedDataError
Source§impl Display for FromLinkedDataError
impl Display for FromLinkedDataError
Source§impl Error for FromLinkedDataError
impl Error for FromLinkedDataError
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()
Auto Trait Implementations§
impl Freeze for FromLinkedDataError
impl RefUnwindSafe for FromLinkedDataError
impl Send for FromLinkedDataError
impl Sync for FromLinkedDataError
impl Unpin for FromLinkedDataError
impl UnsafeUnpin for FromLinkedDataError
impl UnwindSafe for FromLinkedDataError
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
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
Source§fn as_unordered(&self) -> &Unordered<T>
fn as_unordered(&self) -> &Unordered<T>
Views this value as an
Unordered reference.