pub enum ResourceErrorKind<E>{
IriNotAbsolute(IriRef<Box<str>>),
LoaderError(LoaderError),
GraphError {
id: SimpleTerm<'static>,
error: E,
},
NoValueFor {
id: SimpleTerm<'static>,
predicate: SimpleTerm<'static>,
},
UnexpectedMultipleValueFor {
id: SimpleTerm<'static>,
predicate: SimpleTerm<'static>,
},
MissingType {
id: SimpleTerm<'static>,
typ: SimpleTerm<'static>,
},
UnexpectedKind {
id: SimpleTerm<'static>,
predicate: SimpleTerm<'static>,
found_kind: TermKind,
},
UnexpectedDatatype {
id: SimpleTerm<'static>,
predicate: SimpleTerm<'static>,
found_datatype: SimpleTerm<'static>,
},
UnexpectedValue {
id: SimpleTerm<'static>,
predicate: SimpleTerm<'static>,
found_value: SimpleTerm<'static>,
},
}Expand description
An error raised when creating a Resource
Variants§
IriNotAbsolute(IriRef<Box<str>>)
The IRI is not absolute (an can therefore not be dereferenced)
LoaderError(LoaderError)
The resource could not be loaded
GraphError
The underlying graph raised an error
NoValueFor
A value was expected and not found for the given predicate on the given resource
Fields
id: SimpleTerm<'static>The identifier of the resource
predicate: SimpleTerm<'static>The predicate
UnexpectedMultipleValueFor
Multiple values were not expected and were found for the given predicate
Fields
id: SimpleTerm<'static>The identifier of the resource
predicate: SimpleTerm<'static>The predicate
MissingType
The node was expected to have given type
Fields
id: SimpleTerm<'static>The identifier of the resource
typ: SimpleTerm<'static>The expected type
UnexpectedKind
The term was expected to have a given kind
Fields
id: SimpleTerm<'static>The identifier of the resource
predicate: SimpleTerm<'static>The predicate
UnexpectedDatatype
The literal was expected to have a given datatype
Fields
id: SimpleTerm<'static>The identifier of the resource
predicate: SimpleTerm<'static>The predicate
found_datatype: SimpleTerm<'static>The datatype that was found
UnexpectedValue
The literal was expected to have a different value
Fields
id: SimpleTerm<'static>The identifier of the resource
predicate: SimpleTerm<'static>The predicate
found_value: SimpleTerm<'static>The datatype that was found
Trait Implementations§
Source§impl<E> Debug for ResourceErrorKind<E>
impl<E> Debug for ResourceErrorKind<E>
Source§impl<E> From<ResourceErrorKind<E>> for ResourceError<E>
impl<E> From<ResourceErrorKind<E>> for ResourceError<E>
Source§fn from(value: ResourceErrorKind<E>) -> ResourceError<E>
fn from(value: ResourceErrorKind<E>) -> ResourceError<E>
Auto Trait Implementations§
impl<E> Freeze for ResourceErrorKind<E>where
E: Freeze,
impl<E> !RefUnwindSafe for ResourceErrorKind<E>
impl<E> Send for ResourceErrorKind<E>
impl<E> Sync for ResourceErrorKind<E>
impl<E> Unpin for ResourceErrorKind<E>where
E: Unpin,
impl<E> UnsafeUnpin for ResourceErrorKind<E>where
E: UnsafeUnpin,
impl<E> !UnwindSafe for ResourceErrorKind<E>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more