Skip to main content

ResourceErrorKind

Enum ResourceErrorKind 

Source
pub enum ResourceErrorKind<E>
where E: Error + Send + Sync + 'static,
{ 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

Fields

§id: SimpleTerm<'static>

The identifier of the resource

§error: E

The error that was raised

§

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

§found_kind: TermKind

The term kind that was found

§

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>
where E: Debug + Error + Send + Sync + 'static,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<E> From<ResourceErrorKind<E>> for ResourceError<E>
where E: Error + Send + Sync + 'static,

Source§

fn from(value: ResourceErrorKind<E>) -> ResourceError<E>

Converts to this type from the input type.

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> At for T

Source§

fn at<M>(self, metadata: M) -> Meta<T, M>

Wraps self inside a Meta<Self, M> using the given metadata. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> BorrowStripped for T

Source§

fn stripped(&self) -> &Stripped<T>

Source§

impl<T> BorrowUnordered for T

Source§

fn unordered(&self) -> &Unordered<T>

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, C> FromWithContext<T, C> for T

Source§

fn from_with(value: T, _context: &C) -> T

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T, U, C> IntoWithContext<U, C> for T
where U: FromWithContext<T, C>,

Source§

fn into_with(self, context: &C) -> U

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T

Source§

type Owned = T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U, C> TryFromWithContext<U, C> for T
where U: IntoWithContext<T, C>,

Source§

type Error = Infallible

Source§

fn try_from_with( value: U, context: &C, ) -> Result<T, <T as TryFromWithContext<U, C>>::Error>

Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U, C> TryIntoWithContext<U, C> for T
where U: TryFromWithContext<T, C>,

Source§

type Error = <U as TryFromWithContext<T, C>>::Error

Source§

fn try_into_with( self, context: &C, ) -> Result<U, <T as TryIntoWithContext<U, C>>::Error>

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithContext for T
where T: ?Sized,

Source§

fn with<C>(&self, context: C) -> Contextual<&T, C>

Source§

fn into_with<C>(self, context: C) -> Contextual<T, C>

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more