pub struct SchemaWithoutImports { /* private fields */ }
Implementations§
Source§impl SchemaWithoutImports
impl SchemaWithoutImports
pub fn resolve_iriref(&self, iri_ref: &IriRef) -> IriS
Sourcepub fn local_shapes_count(&self) -> usize
pub fn local_shapes_count(&self) -> usize
Return the number of shapes declared in the current schema without counting the ones from imported schemas
Sourcepub fn total_shapes_count(&self) -> usize
pub fn total_shapes_count(&self) -> usize
Return the total number of shapes declared included the ones from imported schemas
Sourcepub fn shapes(
&self,
) -> impl Iterator<Item = (&ShapeExprLabel, &(ShapeExpr, IriS))>
pub fn shapes( &self, ) -> impl Iterator<Item = (&ShapeExprLabel, &(ShapeExpr, IriS))>
Returns an iterator of the shape expressions that the schema contains
For exach shape expression, it returns the label and a pair that contains the shape expression and an optional IRI that points to the source where this shape expression has been imported
If None
it means this is a local shape expression defined in the current schema
Sourcepub fn imported_schemas(&self) -> impl Iterator<Item = &IriOrStr>
pub fn imported_schemas(&self) -> impl Iterator<Item = &IriOrStr>
Get the list of imported schemas
Sourcepub fn resolve_imports(
schema: &Schema,
base: &Option<IriS>,
resolve_method: Option<&ResolveMethod>,
) -> Result<SchemaWithoutImports, SchemaWithoutImportsError>
pub fn resolve_imports( schema: &Schema, base: &Option<IriS>, resolve_method: Option<&ResolveMethod>, ) -> Result<SchemaWithoutImports, SchemaWithoutImportsError>
Resolve the imports declared in a schema
pub fn add_shape_decl( map: &mut HashMap<ShapeExprLabel, (ShapeExpr, IriS)>, decl: ShapeDecl, source_iri: &IriS, ) -> Result<(), SchemaWithoutImportsError>
pub fn resolve_imports_visited( pending: &mut Vec<IriOrStr>, visited: &mut Vec<IriOrStr>, base: &Option<IriS>, resolve_method: &ResolveMethod, map: &mut HashMap<ShapeExprLabel, (ShapeExpr, IriS)>, ) -> Result<(), SchemaWithoutImportsError>
pub fn count_extends(&self) -> HashMap<usize, usize>
Trait Implementations§
Source§impl Clone for SchemaWithoutImports
impl Clone for SchemaWithoutImports
Source§fn clone(&self) -> SchemaWithoutImports
fn clone(&self) -> SchemaWithoutImports
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SchemaWithoutImports
impl Debug for SchemaWithoutImports
Source§impl<'de> Deserialize<'de> for SchemaWithoutImports
impl<'de> Deserialize<'de> for SchemaWithoutImports
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SchemaWithoutImports
impl PartialEq for SchemaWithoutImports
Source§impl Serialize for SchemaWithoutImports
impl Serialize for SchemaWithoutImports
impl StructuralPartialEq for SchemaWithoutImports
Auto Trait Implementations§
impl Freeze for SchemaWithoutImports
impl RefUnwindSafe for SchemaWithoutImports
impl Send for SchemaWithoutImports
impl Sync for SchemaWithoutImports
impl Unpin for SchemaWithoutImports
impl UnwindSafe for SchemaWithoutImports
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 more