pub struct CompiledSchema { /* private fields */ }
Implementations§
Source§impl CompiledSchema
impl CompiledSchema
pub fn new() -> CompiledSchema
pub fn set_prefixmap(&mut self, prefixmap: Option<PrefixMap>)
pub fn prefixmap(&self) -> PrefixMap
pub fn add_shape(&mut self, shape_label: ShapeLabel, se: ShapeExpr)
pub fn get_shape_expr(&self, shape_label: &ShapeLabel) -> Option<&ShapeExpr>
pub fn from_schema_json( &mut self, schema_json: &SchemaJson, ) -> Result<(), CompiledSchemaError>
pub fn find_ref( &mut self, se_ref: &ShapeExprLabel, ) -> Result<ShapeLabelIdx, CompiledSchemaError>
pub fn find_label( &self, label: &ShapeLabel, ) -> Option<(&ShapeLabelIdx, &ShapeExpr)>
pub fn find_shape_label_idx(&self, label: &ShapeLabel) -> Option<&ShapeLabelIdx>
pub fn find_shape_idx( &self, idx: &ShapeLabelIdx, ) -> Option<&(ShapeLabel, ShapeExpr)>
pub fn existing_labels(&self) -> Vec<&ShapeLabel>
pub fn shapes(&self) -> impl Iterator<Item = &(ShapeLabel, ShapeExpr)>
pub fn get_shape_label_idx( &self, shape_label: &ShapeLabel, ) -> Result<ShapeLabelIdx, CompiledSchemaError>
pub fn replace_shape(&mut self, idx: &ShapeLabelIdx, se: ShapeExpr)
pub fn show_label(&self, label: &ShapeLabel) -> String
Trait Implementations§
Source§impl Debug for CompiledSchema
impl Debug for CompiledSchema
Source§impl Default for CompiledSchema
impl Default for CompiledSchema
Source§fn default() -> CompiledSchema
fn default() -> CompiledSchema
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CompiledSchema
impl !RefUnwindSafe for CompiledSchema
impl !Send for CompiledSchema
impl !Sync for CompiledSchema
impl Unpin for CompiledSchema
impl !UnwindSafe for CompiledSchema
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> 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