pub struct NamespaceTable {
pub types: HashMap<NameId, TypeKey>,
pub elements: HashMap<NameId, ElementKey>,
pub attributes: HashMap<NameId, AttributeKey>,
pub attribute_groups: HashMap<NameId, AttributeGroupKey>,
pub model_groups: HashMap<NameId, ModelGroupKey>,
pub notations: HashMap<NameId, NotationKey>,
pub identity_constraints: HashMap<NameId, IdentityConstraintKey>,
}Expand description
Per-namespace component lookup tables
Each namespace has its own table mapping local names to component keys. Uses NameId as keys for fast equality checks.
Fields§
§types: HashMap<NameId, TypeKey>Type definitions (simple and complex)
elements: HashMap<NameId, ElementKey>Element declarations
attributes: HashMap<NameId, AttributeKey>Attribute declarations
attribute_groups: HashMap<NameId, AttributeGroupKey>Attribute groups
model_groups: HashMap<NameId, ModelGroupKey>Named model groups
notations: HashMap<NameId, NotationKey>Notations
identity_constraints: HashMap<NameId, IdentityConstraintKey>Identity constraints (global, for XSD 1.1 refs)
Implementations§
Source§impl NamespaceTable
impl NamespaceTable
pub fn new() -> Self
Sourcepub fn register_type(&mut self, name: NameId, key: TypeKey) -> Option<TypeKey>
pub fn register_type(&mut self, name: NameId, key: TypeKey) -> Option<TypeKey>
Register a type in this namespace
Sourcepub fn register_element(
&mut self,
name: NameId,
key: ElementKey,
) -> Option<ElementKey>
pub fn register_element( &mut self, name: NameId, key: ElementKey, ) -> Option<ElementKey>
Register an element in this namespace
Sourcepub fn register_attribute(
&mut self,
name: NameId,
key: AttributeKey,
) -> Option<AttributeKey>
pub fn register_attribute( &mut self, name: NameId, key: AttributeKey, ) -> Option<AttributeKey>
Register an attribute in this namespace
Sourcepub fn register_model_group(
&mut self,
name: NameId,
key: ModelGroupKey,
) -> Option<ModelGroupKey>
pub fn register_model_group( &mut self, name: NameId, key: ModelGroupKey, ) -> Option<ModelGroupKey>
Register a model group in this namespace
Sourcepub fn register_attribute_group(
&mut self,
name: NameId,
key: AttributeGroupKey,
) -> Option<AttributeGroupKey>
pub fn register_attribute_group( &mut self, name: NameId, key: AttributeGroupKey, ) -> Option<AttributeGroupKey>
Register an attribute group in this namespace
Sourcepub fn register_notation(
&mut self,
name: NameId,
key: NotationKey,
) -> Option<NotationKey>
pub fn register_notation( &mut self, name: NameId, key: NotationKey, ) -> Option<NotationKey>
Register a notation in this namespace
Trait Implementations§
Source§impl Debug for NamespaceTable
impl Debug for NamespaceTable
Source§impl Default for NamespaceTable
impl Default for NamespaceTable
Source§fn default() -> NamespaceTable
fn default() -> NamespaceTable
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NamespaceTable
impl RefUnwindSafe for NamespaceTable
impl Send for NamespaceTable
impl Sync for NamespaceTable
impl Unpin for NamespaceTable
impl UnsafeUnpin for NamespaceTable
impl UnwindSafe for NamespaceTable
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