pub struct Schema { /* private fields */ }
Implementations§
Source§impl Schema
impl Schema
pub fn new() -> Schema
pub fn source_iri(&self) -> IriS
pub fn with_source_iri(&mut self, source_iri: &IriS)
pub fn with_import(self, i: IriOrStr) -> Self
pub fn with_start_actions(self, start_actions: Option<Vec<SemAct>>) -> Self
pub fn add_prefix( &mut self, alias: &str, iri: &IriS, ) -> Result<(), PrefixMapError>
pub fn with_prefixmap(self, prefixmap: Option<PrefixMap>) -> Self
pub fn with_base(self, base: Option<IriS>) -> Self
pub fn with_start(self, start: Option<ShapeExpr>) -> Self
pub fn with_shapes(self, shapes: Option<Vec<ShapeDecl>>) -> Self
pub fn resolve_iriref(&self, iri_ref: &IriRef) -> IriS
pub fn add_shape( &mut self, shape_label: ShapeExprLabel, shape_expr: ShapeExpr, is_abstract: bool, )
pub fn add_shape_decl(&mut self, shape_decl: &ShapeDecl)
pub fn parse_schema_buf(path: &Path) -> Result<Schema, SchemaJsonError>
pub fn from_reader<R: Read>(rdr: R) -> Result<Schema, SchemaJsonError>
pub fn parse_schema_name( schema_name: &String, base: &Path, ) -> Result<Schema, SchemaJsonError>
pub fn base(&self) -> Option<IriS>
pub fn prefixmap(&self) -> Option<PrefixMap>
pub fn start_actions(&self) -> Option<Vec<SemAct>>
pub fn start(&self) -> Option<ShapeExpr>
pub fn shapes(&self) -> Option<Vec<ShapeDecl>>
pub fn get_type(&self) -> String
pub fn find_shape_by_label( &self, label: &ShapeExprLabel, ) -> Result<Option<ShapeExpr>, SchemaJsonError>
pub fn find_shape_by_iri_ref( &self, shape: &IriRef, ) -> Result<Option<ShapeExpr>, SchemaJsonError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Schema
impl<'de> Deserialize<'de> for Schema
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
impl StructuralPartialEq for Schema
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
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