Skip to main content

ShaclError

Enum ShaclError 

Source
pub enum ShaclError {
Show 24 variants ShapeParsing(String), ConstraintValidation(String), TargetSelection(String), PropertyPath(String), PathEvaluationError(String), SparqlExecution(String), ValidationEngine(String), ReportGeneration(String), Configuration(String), Core(OxirsError), Io(String), Regex(Error), Json(String), IriResolution(IriResolutionError), SecurityViolation(String), ShapeValidation(String), Timeout(String), MemoryLimit(String), RecursionLimit(String), MemoryPool(String), MemoryOptimization(String), AsyncOperation(String), UnsupportedOperation(String), ReportError(String),
}
Expand description

Core error type for SHACL operations.

Every fallible API in this crate returns Result<T>, which is a type alias for std::result::Result<T, ShaclError>. The variants below cover the full surface area of the validation pipeline — parsing, constraint evaluation, property path traversal, SPARQL execution, reporting, and resource limits.

All variants derive thiserror::Error and provide a human-readable Display implementation suitable for inclusion in user-facing diagnostics. Errors that wrap foreign types (oxirs_core::OxirsError, regex::Error, IriResolutionError) implement From so the ? operator works without boilerplate.

Variants§

§

ShapeParsing(String)

A shape document failed to parse (malformed Turtle/RDF, missing required terms, or invalid SHACL syntax).

§

ConstraintValidation(String)

A constraint definition was rejected during structural validation (e.g. invalid sh:pattern regex, contradictory cardinalities).

§

TargetSelection(String)

Target selection failed — typically a malformed sh:target* declaration or an inaccessible store.

§

PropertyPath(String)

A property path expression could not be parsed.

§

PathEvaluationError(String)

A property path evaluated correctly but produced an unexpected result during traversal (cycles, infinite paths beyond the recursion limit).

§

SparqlExecution(String)

A SPARQL query (used by SHACL-SPARQL constraints, SHACL-AF targets, or the optimizer) failed to execute.

§

ValidationEngine(String)

The validation engine itself reported an internal error (orchestration failure, scheduler error, etc.).

§

ReportGeneration(String)

Producing a validation report failed (serialisation, IO, or formatter error).

§

Configuration(String)

A user-supplied ValidationConfig or builder argument is invalid.

§

Core(OxirsError)

Wrapped error originating in the oxirs-core RDF data model.

§

Io(String)

Wrapped std::io::Error.

§

Regex(Error)

A sh:pattern regex failed to compile.

§

Json(String)

JSON serialisation/deserialisation error (used by the JSON-LD report writer and YAML config loader).

§

IriResolution(IriResolutionError)

IRI resolution failed (relative IRI without a base, malformed prefix, etc.).

§

SecurityViolation(String)

A SHACL-SPARQL constraint was rejected by the security policy (forbidden function, query too expensive, network egress denied).

§

ShapeValidation(String)

A higher-level shape contract was violated (e.g. inheritance cycle, conflicting sh:property definitions).

§

Timeout(String)

Validation exceeded the configured wall-clock timeout.

§

MemoryLimit(String)

Validation exceeded the configured memory budget.

§

RecursionLimit(String)

Recursive shape evaluation reached ValidationConfig::max_recursion_depth.

§

MemoryPool(String)

Internal pool used for short-lived allocations failed.

§

MemoryOptimization(String)

Memory-aware optimisation pass aborted.

§

AsyncOperation(String)

An async runtime task failed (only when the async feature is enabled).

§

UnsupportedOperation(String)

A construct was recognised but is not yet implemented in this build (typically gated behind a Cargo feature).

§

ReportError(String)

Generic report-related failure (writer IO, missing template, etc.).

Trait Implementations§

Source§

impl Clone for ShaclError

Source§

fn clone(&self) -> ShaclError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ShaclError

Source§

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

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

impl Display for ShaclError

Source§

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

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

impl Error for ShaclError

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

impl From<Error> for ShaclError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for ShaclError

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for ShaclError

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for ShaclError

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for ShaclError

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for ShaclError

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<IriResolutionError> for ShaclError

Source§

fn from(source: IriResolutionError) -> Self

Converts to this type from the input type.
Source§

impl From<OxirsError> for ShaclError

Source§

fn from(source: OxirsError) -> Self

Converts to this type from the input type.
Source§

impl From<ShaclError> for IntegrationError

Source§

fn from(source: ShaclError) -> Self

Converts to this type from the input type.

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> 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> 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: Sized + 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: Sized + 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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, 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