Skip to main content

RDFError

Enum RDFError 

Source
pub enum RDFError {
Show 59 variants DefaultError { msg: String, }, LanguageTagError { literal: String, language: String, error: String, }, IriRefError { iri_ref: String, }, ParsingIri { iri: String, error: String, }, ConversionError { msg: String, }, ObjectAsTerm { object: String, }, TermAsIri { term: String, }, TermAsBNode { term: String, }, TermAsIriS { term: String, }, TermAsLiteral { term: String, }, LiteralAsSLiteral { literal: String, }, TermAsObject { term: String, error: String, }, TermAsSubject { term: String, }, TermAsLang { term: String, }, ExpectedIriOrBlankNodeFoundLiteral { literal: String, }, ExpectedIriOrBlankNodeFoundTriple { subject: String, predicate: String, object: String, }, ExpectedIriOrBlankNodeError { term: String, error: String, }, ExpectedLiteralError { term: String, }, ExpectedIntegerError { term: String, }, ExpectedIRIError { term: String, }, ExpectedConcreteLiteralError { term: String, }, ExpectedNumberError { term: String, }, ExpectedBooleanError { term: String, }, ExpectedObjectError { term: String, }, ExpectedNilError { term: String, }, ComparisonError { term1: String, term2: String, }, ObtainingTriples { error: String, }, FailedCheckingAssertion { subject: String, predicate: String, object: String, error: String, }, ErrorSubjectsFor { predicate: String, object: String, error: String, }, ErrorObjectsFor { subject: String, predicate: String, error: String, }, WritingTableError { error: String, }, NoFocusNodeError, ExpectedSubjectError { node: String, context: String, }, NotSupportedRDFFormatError { format: String, }, FailedOrError { err1: Box<RDFError>, err2: Box<RDFError>, }, FailedNotError { value: String, }, InvalidSHACLPathError { node: String, error: Box<RDFError>, }, FailedOpaqueError { msg: String, context: Option<String>, }, ParseFailError { msg: String, }, FailedCondError { msg: String, }, RecursiveRDFListError { node: String, }, FailedTermToRDFNodeError { term: String, }, FailedSubjectToRDFNodeError { subject: String, }, SubjectToIriOrBlankNodeError { subject: String, }, ExpectedFocusAsSubjectError { focus: String, }, MoreThanOneValuePredicateError { node: String, pred: String, value1: String, value2: String, }, NoValuesPredicateError { node: String, pred: String, }, NoValuesPredicateDebugError { node: String, pred: String, outgoing_arcs: String, }, OutgoingArcsError { focus: String, error: String, }, NodeDoesntSatisfyConditionError { condition_name: String, node: String, }, FailedInstancesOfError { object: String, }, PropertyNotFoundError { property: String, subject: String, err: Box<RDFError>, }, FailedTermToObjectError { term: String, }, MoreThanOneInstanceError { type_iri: String, }, TypeMismatchError { expected: String, actual: String, }, FailedConditionalError { msg: String, }, ReadingConfigError { path_name: String, error: Error, }, TomlError { path_name: String, error: Error, }, ConvertingIriEndpoint { error: String, str: String, },
}
Expand description

Represents all possible errors that can occur during RDF operations.

Variants§

§

DefaultError

Default / fallback error.

Fields

§

LanguageTagError

Error parsing or validating a language tag in an RDF literal.

§Fields

  • literal: The complete literal value that contains the invalid language tag
  • language: The invalid language tag that was encountered
  • error: A detailed description of why the language tag is invalid

Fields

§literal: String
§language: String
§error: String
§

IriRefError

Error obtaining a valid IRI from an IRI reference.

This occurs when attempting to resolve an IRI reference (which may be relative) into an absolute IRI, but the reference is invalid or cannot be resolved.

§Fields

  • iri_ref: The IRI reference string that could not be resolved

Fields

§iri_ref: String
§

ParsingIri

Error parsing a string into a valid IRI.

§Fields

  • iri: The string that failed to parse as an IRI
  • error: Details about the parsing failure

Fields

§error: String
§

ConversionError

Generic conversion error for RDF data transformations.

§Fields

  • msg: A human-readable message describing the conversion failure

Fields

§

ObjectAsTerm

Error converting an RDF object node to a generic RDF term.

§Fields

  • object: String representation of the object that failed conversion

Fields

§object: String
§

TermAsIri

Error converting a generic RDF term to a specific IRI type.

§Fields

  • term: String representation of the term that failed IRI conversion

Fields

§term: String
§

TermAsBNode

Error converting a generic RDF term to a blank node.

§Fields

  • term: String representation of the term that failed blank node conversion

Fields

§term: String
§

TermAsIriS

Error converting a generic RDF term to a concrete IRI type (IriS).

§Fields

  • term: String representation of the term that failed IriS conversion

Fields

§term: String
§

TermAsLiteral

Error converting a generic RDF term to a literal.

§Fields

  • term: String representation of the term that failed literal conversion

Fields

§term: String
§

LiteralAsSLiteral

Error converting a generic literal to a specific string literal type (ConcreteLiteral).

§Fields

  • literal: String representation of the literal that failed conversion

Fields

§literal: String
§

TermAsObject

Error converting a generic RDF term to an object node.

§Fields

  • term: String representation of the term that failed object conversion
  • error: Detailed description of the conversion failure

Fields

§term: String
§error: String
§

TermAsSubject

Error converting a generic RDF term to a subject node.

§Fields

  • term: String representation of the term that failed subject conversion

Fields

§term: String
§

TermAsLang

Error converting a generic RDF term to a language tag.

This typically occurs when attempting to extract language information from a term that is not a language-tagged string literal.

§Fields

  • term: String representation of the term that failed language tag conversion

Fields

§term: String
§

ExpectedIriOrBlankNodeFoundLiteral

Expected an IRI or blank node in subject/object position, but found a literal.

§Fields

  • literal: The literal value that appeared in an invalid position

Fields

§literal: String
§

ExpectedIriOrBlankNodeFoundTriple

Expected an IRI or blank node, but found an RDF-star quoted triple.

§Fields

  • subject: Subject of the unexpected triple term
  • predicate: Predicate of the unexpected triple term
  • object: Object of the unexpected triple term

Fields

§subject: String
§predicate: String
§object: String
§

ExpectedIriOrBlankNodeError

Error when expecting the focus node to be an IRI or blank node.

§Fields

  • term: String representation of the focus node that is not an IRI or blank node
  • error: Detailed description of why the conversion failed

Fields

§term: String
§error: String
§

ExpectedLiteralError

Error when expecting a literal but found a different term type.

§Fields

  • term: String representation of the term that is not a literal

Fields

§term: String
§

ExpectedIntegerError

Error when expecting an integer literal but found a different literal type.

§Fields

  • term: String representation of the term that is not an integer/boolean literal

Fields

§term: String
§

ExpectedIRIError

Error when expecting an IRI but found a different term type.

§Fields

  • term: String representation of the term that is not an IRI

Fields

§term: String
§

ExpectedConcreteLiteralError

Error when expecting a concrete literal but found a different literal type.

§Fields

  • term: String representation of the term that cannot be converted to concrete literal

Fields

§term: String
§

ExpectedNumberError

Error when expecting a numeric literal but found a different literal type.

§Fields

  • term: String representation of the term that is not a numeric literal

Fields

§term: String
§

ExpectedBooleanError

Error when expecting a boolean literal but found a different literal type.

§Fields

  • term: String representation of the term that is not a boolean literal

Fields

§term: String
§

ExpectedObjectError

Error when expecting an object but found a different term type.

§Fields

  • term: String representation of the term that is not an object

Fields

§term: String
§

ExpectedNilError

Error when expecting rdf:nil but found a different term type.

§Fields

  • term: String representation of the term that is not an rdf:nil

Fields

§term: String
§

ComparisonError

Error comparing two RDF terms.

§Fields

  • term1: String representation of the first term
  • term2: String representation of the second term

Fields

§term1: String
§term2: String
§

ObtainingTriples

Error retrieving triples from an RDF graph or dataset.

§Fields

  • error: Detailed description of the triple retrieval failure

Fields

§error: String
§

FailedCheckingAssertion

Error checking whether a specific triple exists in an RDF graph.

§Fields

  • subject: Subject of the triple being checked
  • predicate: Predicate of the triple being checked
  • object: Object of the triple being checked
  • error: Detailed description of why the check failed

Fields

§subject: String
§predicate: String
§object: String
§error: String
§

ErrorSubjectsFor

Error finding subjects that match a given predicate-object pattern.

§Fields

  • predicate: The predicate being queried
  • object: The object being queried
  • error: Detailed description of the query failure

Fields

§predicate: String
§object: String
§error: String
§

ErrorObjectsFor

Error finding objects that match a given subject-predicate pattern.

§Fields

  • subject: The subject being queried
  • predicate: The predicate being queried
  • error: Detailed description of the query failure

Fields

§subject: String
§predicate: String
§error: String
§

WritingTableError

Error formatting SPARQL query results as a table.

§Fields

  • error: Detailed description of the table writing failure

Fields

§error: String
§

NoFocusNodeError

Error when a parsing operation requires a focus node but none is set.

§

ExpectedSubjectError

Error when expecting the focus node to be a valid RDF subject.

§Fields

  • node: String representation of the focus node that is not a valid subject
  • context: The operation or context where the subject was expected

Fields

§node: String
§context: String
§

NotSupportedRDFFormatError

Error when attempting to parse or process an unsupported RDF format.

§Fields

  • format: The unsupported format identifier that was requested

Fields

§format: String
§

FailedOrError

Error when both branches of an or combinator fail.

§Fields

  • err1: The error from the first parser that was tried
  • err2: The error from the second (fallback) parser

Fields

§

FailedNotError

Error when a not combinator’s inner parser unexpectedly succeeds.

§Fields

  • value: String representation of the unexpected successful parse result

Fields

§value: String
§

InvalidSHACLPathError

Error when an RDF node cannot be parsed as a valid SHACL path.

§Fields

  • node: String representation of the RDF node being parsed
  • context: Where the parsing was attempted (e.g. function name)
  • error: The underlying parsing error

Fields

§node: String
§error: Box<RDFError>
§

FailedOpaqueError

Error when an opaque parser fails to execute or provide a valid parser.

§Fields

  • msg: A detailed description of why the opaque parser failed
  • context: Optional context about where in the parsing process the failure occurred

Fields

§context: Option<String>
§

ParseFailError

Error when a parser explicitly fails with a custom message.

§Fields

  • msg: The custom error message describing why the parser failed

Fields

§

FailedCondError

Error when a conditional validation fails.

§Fields

  • msg: The error message describing which condition failed

Fields

§

RecursiveRDFListError

Error when parsing an RDF list that contains a cycle.

§Fields

  • node: String representation of the node that creates the cycle

Fields

§node: String
§

FailedTermToRDFNodeError

Error when attempting to convert a term to an RDF node (Object) fails.

§Fields

  • term: String representation of the term that failed conversion

Fields

§term: String
§

FailedSubjectToRDFNodeError

§Fields

  • subject: String representation of the term that failed conversion

Fields

§subject: String
§

SubjectToIriOrBlankNodeError

Error when attempting to convert an RDF subject to an IRI or blank node.

§Fields

  • subject: String representation of the subject that failed conversion

Fields

§subject: String
§

ExpectedFocusAsSubjectError

Error when expecting the focus node to be a valid RDF subject.

§Fields

  • focus: String representation of the focus node that is not a valid subject

Fields

§focus: String
§

MoreThanOneValuePredicateError

Error when a property has more than one value but exactly one was expected.

§Fields

  • node: String representation of the node being queried
  • pred: The property/predicate that has multiple values
  • value1: String representation of the first value found
  • value2: String representation of the second value found

Fields

§node: String
§pred: String
§value1: String
§value2: String
§

NoValuesPredicateError

Error when a property has no values but at least one was expected.

§Fields

  • node: String representation of the node being queried
  • pred: The property/predicate that has no values

Fields

§node: String
§pred: String
§

NoValuesPredicateDebugError

Error when a property has no values (debug version with neighborhood info).

§Fields

  • node: String representation of the node being queried
  • pred: The property/predicate that has no values
  • outgoing_arcs: String representation of all outgoing arcs from the node

Fields

§node: String
§pred: String
§outgoing_arcs: String
§

OutgoingArcsError

Error when failing to obtain outgoing arcs from a focus node.

§Fields

  • focus: String representation of the focus node
  • error: Detailed description of why obtaining outgoing arcs failed

Fields

§focus: String
§error: String
§

NodeDoesntSatisfyConditionError

Error when a node fails to satisfy a predicate condition.

§Fields

  • condition_name: The name/description of the condition that was not satisfied
  • node: String representation of the node that failed the condition

Fields

§condition_name: String
§node: String
§

FailedInstancesOfError

Error when no instances of a specified type are found in the RDF data.

§Fields

  • object: The IRI of the expected type/class that has no instances

Fields

§object: String
§

PropertyNotFoundError

Error when a required property is not found on a node.

§Fields

  • property: The predicate that was expected
  • subject: The subject node where the property was searched
  • err: Underlying error

Fields

§property: String
§subject: String
§

FailedTermToObjectError

Error when attempting to convert a term into an RDF Object.

§Fields

  • term: String representation of the term that failed conversion

Fields

§term: String
§

MoreThanOneInstanceError

Error when more than one instance of a given type is found when exactly one was expected.

§Fields

  • type_iri: The IRI of the type that has multiple instances

Fields

§type_iri: String
§

TypeMismatchError

Error when an RDF node has a type different from the expected one.

§Fields

  • expected: String representation of the expected RDF type
  • actual: String representation of the actual RDF type found

Fields

§expected: String
§actual: String
§

FailedConditionalError

Error when a conditional parser predicate evaluates to false.

§Fields

  • msg: Explanation of why the condition failed

Fields

§

ReadingConfigError

Error reading the configuration file from disk.

§Fields

  • path_name: The path of the file that could not be read
  • error: The underlying I/O error

Fields

§path_name: String
§error: Error
§

TomlError

Error parsing the TOML configuration file.

§Fields

  • path_name: The path of the TOML file that failed to parse
  • error: The underlying TOML parsing error

Fields

§path_name: String
§error: Error
§

ConvertingIriEndpoint

Error converting a string to a valid IRI for an endpoint.

§Fields

  • error: Detailed description of the IRI parsing failure
  • str: The string that failed to parse as an IRI

Fields

§error: String

Trait Implementations§

Source§

impl Debug for RDFError

Source§

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

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

impl Display for RDFError

Source§

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

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

impl Error for RDFError

1.30.0 · Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

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> 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToStringFallible for T
where T: Display,

Source§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

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> 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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