Struct ion_schema::system::SchemaSystem
source · pub struct SchemaSystem { /* private fields */ }Expand description
Provides functions for instantiating instances of Schema.
Implementations
sourceimpl SchemaSystem
impl SchemaSystem
pub fn new(authorities: Vec<Box<dyn DocumentAuthority>>) -> Self
sourcepub fn load_schema<A: AsRef<str>>(
&mut self,
id: A
) -> IonSchemaResult<Rc<Schema>>
pub fn load_schema<A: AsRef<str>>(
&mut self,
id: A
) -> IonSchemaResult<Rc<Schema>>
Requests each of the provided DocumentAuthoritys, in order, to resolve the requested schema id
until one successfully resolves it.
If an authority throws an exception, resolution silently proceeds to the next authority.
sourcepub fn schema_from_isl_types<A: AsRef<str>, B: Into<Vec<IslType>>>(
&self,
id: A,
isl_types: B
) -> IonSchemaResult<Schema>
pub fn schema_from_isl_types<A: AsRef<str>, B: Into<Vec<IslType>>>(
&self,
id: A,
isl_types: B
) -> IonSchemaResult<Schema>
sourcepub fn schema_type_from_element(
&mut self,
type_content: &Element,
type_store: &mut TypeStore
) -> IonSchemaResult<TypeId>
pub fn schema_type_from_element(
&mut self,
type_content: &Element,
type_store: &mut TypeStore
) -> IonSchemaResult<TypeId>
Creates a type from given Element using TypeStore
Auto Trait Implementations
impl !RefUnwindSafe for SchemaSystem
impl !Send for SchemaSystem
impl !Sync for SchemaSystem
impl Unpin for SchemaSystem
impl !UnwindSafe for SchemaSystem
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more