shacl 0.2.20

A SHACL validator for RDF data, implemented in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use rudof_rdf::rdf_core::term::Object;
use thiserror::Error;

#[derive(Debug, Error)]
pub enum ASTError {
    #[error("A shape of type {expected} was expected, but found {shape}")]
    UnexpectedShapeType { expected: String, shape: Box<Object> },

    #[error("Not found shape {0}")]
    ShapeNotFound(Box<Object>),
}

impl From<Object> for ASTError {
    fn from(value: Object) -> Self {
        Self::ShapeNotFound(Box::new(value))
    }
}