Struct ion_schema::system::Resolver
source · pub struct Resolver { /* private fields */ }
Expand description
Provides functions to load Schema
with type definitions using authorities for SchemaSystem
Implementations§
source§impl Resolver
impl Resolver
pub fn new(authorities: Vec<Box<dyn DocumentAuthority>>) -> Self
pub fn schema_from_isl_types<A: AsRef<str>, B: Into<Vec<IslType>>>( &self, isl_version: IslVersion, id: A, isl_types: B ) -> IonSchemaResult<Schema>
sourcepub fn isl_schema_from_elements<I: Iterator<Item = Element>>(
&mut self,
elements: I,
id: &str
) -> IonSchemaResult<IslSchema>
pub fn isl_schema_from_elements<I: Iterator<Item = Element>>( &mut self, elements: I, id: &str ) -> IonSchemaResult<IslSchema>
Converts given owned elements into ISL v2.0 representation
sourcepub fn schema_from_isl_schema(
&mut self,
isl_version: IslVersion,
isl: IslSchema,
type_store: &mut TypeStore,
load_isl_import: Option<&IslImport>
) -> IonSchemaResult<Arc<Schema>>
pub fn schema_from_isl_schema( &mut self, isl_version: IslVersion, isl: IslSchema, type_store: &mut TypeStore, load_isl_import: Option<&IslImport> ) -> IonSchemaResult<Arc<Schema>>
Converts given ISL representation into a Schema
based on given ISL version
Auto Trait Implementations§
impl !RefUnwindSafe for Resolver
impl Send for Resolver
impl Sync for Resolver
impl Unpin for Resolver
impl !UnwindSafe for Resolver
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