Struct ion_schema::schema::Schema
source · [−]pub struct Schema { /* private fields */ }Expand description
A Schema is a collection of zero or more TypeRefs.
Each type may refer to other types within the same schema,
or types imported into this schema from other schemas.
To instantiate a Schema, see SchemaSystem.
Implementations
sourceimpl Schema
impl Schema
sourcepub fn get_type<A: AsRef<str>>(&self, name: A) -> Option<TypeRef>
pub fn get_type<A: AsRef<str>>(&self, name: A) -> Option<TypeRef>
Returns the requested type, if present in this schema; otherwise returns None.
sourcepub fn get_types(&self) -> SchemaTypeIteratorⓘNotable traits for SchemaTypeIteratorimpl Iterator for SchemaTypeIterator type Item = TypeRef;
pub fn get_types(&self) -> SchemaTypeIteratorⓘNotable traits for SchemaTypeIteratorimpl Iterator for SchemaTypeIterator type Item = TypeRef;
Returns an iterator over the types in this schema.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Schema
impl !Send for Schema
impl !Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
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