pub struct SchemaIR { /* private fields */ }Implementations§
Source§impl SchemaIR
impl SchemaIR
pub fn new(prefixmap: PrefixMap, base: Option<IriS>) -> SchemaIR
pub fn from_reader<R: Read>( read: &mut R, source_name: &str, format: &RDFFormat, base: Option<&str>, reader_mode: &ReaderMode, ) -> Result<SchemaIR, Box<CompiledShaclError>>
pub fn from_str( data: &str, format: &RDFFormat, base: Option<&str>, reader_mode: &ReaderMode, ) -> Result<SchemaIR, Box<CompiledShaclError>>
Sourcepub fn add_shape_idx(
&mut self,
sref: Object,
) -> Result<Either<ShapeLabelIdx, ShapeLabelIdx>, Box<CompiledShaclError>>
pub fn add_shape_idx( &mut self, sref: Object, ) -> Result<Either<ShapeLabelIdx, ShapeLabelIdx>, Box<CompiledShaclError>>
Adds a shape index for the given RDFNode if it does not already exist.
Returns Right(ShapeLabelIdx) if a new index was created or Left(ShapeLabelIdx) with the existing one.
pub fn prefix_map(&self) -> PrefixMap ⓘ
pub fn base(&self) -> &Option<IriS>
pub fn iter(&self) -> impl Iterator<Item = (&Object, &ShapeIR)>
Sourcepub fn iter_with_targets(&self) -> impl Iterator<Item = (&Object, &ShapeIR)>
pub fn iter_with_targets(&self) -> impl Iterator<Item = (&Object, &ShapeIR)>
Iterate over all shapes that have at least one target.
Sourcepub fn get_shape_idx(&self, sref: &Object) -> Option<ShapeLabelIdx>
pub fn get_shape_idx(&self, sref: &Object) -> Option<ShapeLabelIdx>
Returns the ShapeLabelIdx for the given shape reference Object, if it exists.
pub fn get_shape(&self, sref: &Object) -> Option<&ShapeIR>
pub fn add_shape( &mut self, idx: ShapeLabelIdx, shape: ShapeIR, ) -> Result<ShapeLabelIdx, Box<CompiledShaclError>>
pub fn compile<RDF: Rdf>( schema: &ShaclSchema<RDF>, ) -> Result<SchemaIR, Box<CompiledShaclError>>
pub fn get_shape_from_idx(&self, shape_idx: &ShapeLabelIdx) -> Option<&ShapeIR>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SchemaIR
impl RefUnwindSafe for SchemaIR
impl Send for SchemaIR
impl Sync for SchemaIR
impl Unpin for SchemaIR
impl UnsafeUnpin for SchemaIR
impl UnwindSafe for SchemaIR
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreSource§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.