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.
LanguageTagError
Error parsing or validating a language tag in an RDF literal.
§Fields
literal: The complete literal value that contains the invalid language taglanguage: The invalid language tag that was encounterederror: A detailed description of why the language tag is invalid
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
ParsingIri
Error parsing a string into a valid IRI.
§Fields
iri: The string that failed to parse as an IRIerror: Details about the parsing failure
ConversionError
Generic conversion error for RDF data transformations.
§Fields
msg: A human-readable message describing the conversion failure
ObjectAsTerm
Error converting an RDF object node to a generic RDF term.
§Fields
object: String representation of the object that failed conversion
TermAsIri
Error converting a generic RDF term to a specific IRI type.
§Fields
term: String representation of the term that failed IRI conversion
TermAsBNode
Error converting a generic RDF term to a blank node.
§Fields
term: String representation of the term that failed blank node conversion
TermAsIriS
Error converting a generic RDF term to a concrete IRI type (IriS).
§Fields
term: String representation of the term that failed IriS conversion
TermAsLiteral
Error converting a generic RDF term to a literal.
§Fields
term: String representation of the term that failed literal conversion
LiteralAsSLiteral
Error converting a generic literal to a specific string literal type (ConcreteLiteral).
§Fields
literal: String representation of the literal that failed conversion
TermAsObject
Error converting a generic RDF term to an object node.
§Fields
term: String representation of the term that failed object conversionerror: Detailed description of the conversion failure
TermAsSubject
Error converting a generic RDF term to a subject node.
§Fields
term: String representation of the term that failed subject conversion
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
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
ExpectedIriOrBlankNodeFoundTriple
Expected an IRI or blank node, but found an RDF-star quoted triple.
§Fields
subject: Subject of the unexpected triple termpredicate: Predicate of the unexpected triple termobject: Object of the unexpected triple term
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 nodeerror: Detailed description of why the conversion failed
ExpectedLiteralError
Error when expecting a literal but found a different term type.
§Fields
term: String representation of the term that is not a literal
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
ExpectedIRIError
Error when expecting an IRI but found a different term type.
§Fields
term: String representation of the term that is not an IRI
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
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
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
ExpectedObjectError
Error when expecting an object but found a different term type.
§Fields
term: String representation of the term that is not an object
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
ComparisonError
Error comparing two RDF terms.
§Fields
term1: String representation of the first termterm2: String representation of the second term
ObtainingTriples
Error retrieving triples from an RDF graph or dataset.
§Fields
error: Detailed description of the triple retrieval failure
FailedCheckingAssertion
Error checking whether a specific triple exists in an RDF graph.
§Fields
subject: Subject of the triple being checkedpredicate: Predicate of the triple being checkedobject: Object of the triple being checkederror: Detailed description of why the check failed
ErrorSubjectsFor
Error finding subjects that match a given predicate-object pattern.
§Fields
predicate: The predicate being queriedobject: The object being queriederror: Detailed description of the query failure
ErrorObjectsFor
Error finding objects that match a given subject-predicate pattern.
§Fields
subject: The subject being queriedpredicate: The predicate being queriederror: Detailed description of the query failure
WritingTableError
Error formatting SPARQL query results as a table.
§Fields
error: Detailed description of the table writing failure
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 subjectcontext: The operation or context where the subject was expected
NotSupportedRDFFormatError
Error when attempting to parse or process an unsupported RDF format.
§Fields
format: The unsupported format identifier that was requested
FailedOrError
Error when both branches of an or combinator fail.
§Fields
err1: The error from the first parser that was triederr2: The error from the second (fallback) parser
FailedNotError
Error when a not combinator’s inner parser unexpectedly succeeds.
§Fields
value: String representation of the unexpected successful parse result
InvalidSHACLPathError
Error when an RDF node cannot be parsed as a valid SHACL path.
§Fields
node: String representation of the RDF node being parsedcontext: Where the parsing was attempted (e.g. function name)error: The underlying parsing error
FailedOpaqueError
Error when an opaque parser fails to execute or provide a valid parser.
§Fields
msg: A detailed description of why the opaque parser failedcontext: Optional context about where in the parsing process the failure occurred
ParseFailError
Error when a parser explicitly fails with a custom message.
§Fields
msg: The custom error message describing why the parser failed
FailedCondError
Error when a conditional validation fails.
§Fields
msg: The error message describing which condition failed
RecursiveRDFListError
Error when parsing an RDF list that contains a cycle.
§Fields
node: String representation of the node that creates the cycle
FailedTermToRDFNodeError
Error when attempting to convert a term to an RDF node (Object) fails.
§Fields
term: String representation of the term that failed conversion
FailedSubjectToRDFNodeError
§Fields
subject: String representation of the term that failed conversion
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
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
MoreThanOneValuePredicateError
Error when a property has more than one value but exactly one was expected.
§Fields
node: String representation of the node being queriedpred: The property/predicate that has multiple valuesvalue1: String representation of the first value foundvalue2: String representation of the second value found
NoValuesPredicateError
Error when a property has no values but at least one was expected.
§Fields
node: String representation of the node being queriedpred: The property/predicate that has no values
NoValuesPredicateDebugError
Error when a property has no values (debug version with neighborhood info).
§Fields
node: String representation of the node being queriedpred: The property/predicate that has no valuesoutgoing_arcs: String representation of all outgoing arcs from the node
OutgoingArcsError
Error when failing to obtain outgoing arcs from a focus node.
§Fields
focus: String representation of the focus nodeerror: Detailed description of why obtaining outgoing arcs failed
NodeDoesntSatisfyConditionError
Error when a node fails to satisfy a predicate condition.
§Fields
condition_name: The name/description of the condition that was not satisfiednode: String representation of the node that failed the condition
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
PropertyNotFoundError
Error when a required property is not found on a node.
§Fields
property: The predicate that was expectedsubject: The subject node where the property was searchederr: Underlying error
FailedTermToObjectError
Error when attempting to convert a term into an RDF Object.
§Fields
term: String representation of the term that failed conversion
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
TypeMismatchError
Error when an RDF node has a type different from the expected one.
§Fields
expected: String representation of the expected RDF typeactual: String representation of the actual RDF type found
FailedConditionalError
Error when a conditional parser predicate evaluates to false.
§Fields
msg: Explanation of why the condition failed
ReadingConfigError
Error reading the configuration file from disk.
§Fields
path_name: The path of the file that could not be readerror: The underlying I/O error
TomlError
Error parsing the TOML configuration file.
§Fields
path_name: The path of the TOML file that failed to parseerror: The underlying TOML parsing error
ConvertingIriEndpoint
Error converting a string to a valid IRI for an endpoint.
§Fields
error: Detailed description of the IRI parsing failurestr: The string that failed to parse as an IRI
Trait Implementations§
Source§impl Error for RDFError
impl Error for RDFError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for RDFError
impl !RefUnwindSafe for RDFError
impl Send for RDFError
impl Sync for RDFError
impl Unpin for RDFError
impl UnsafeUnpin for RDFError
impl !UnwindSafe for RDFError
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.