pub struct DocumentComponentIndex { /* private fields */ }Expand description
Per-document index of top-level components declared by a single schema document.
Populated during assembly (register_* calls) and used for document-scoped
lookup in apply_redefine() and apply_override().
Implementations§
Source§impl DocumentComponentIndex
impl DocumentComponentIndex
pub fn new() -> Self
Sourcepub fn insert(&mut self, identity: ComponentIdentity, key: ComponentKey)
pub fn insert(&mut self, identity: ComponentIdentity, key: ComponentKey)
Insert a component into the index.
Sourcepub fn lookup_type(
&self,
namespace: Option<NameId>,
name: NameId,
) -> Option<TypeKey>
pub fn lookup_type( &self, namespace: Option<NameId>, name: NameId, ) -> Option<TypeKey>
Look up a type by namespace and local name (both simple and complex).
Sourcepub fn lookup_simple_type(
&self,
namespace: Option<NameId>,
name: NameId,
) -> Option<SimpleTypeKey>
pub fn lookup_simple_type( &self, namespace: Option<NameId>, name: NameId, ) -> Option<SimpleTypeKey>
Look up a simple type by namespace and local name.
Sourcepub fn lookup_complex_type(
&self,
namespace: Option<NameId>,
name: NameId,
) -> Option<ComplexTypeKey>
pub fn lookup_complex_type( &self, namespace: Option<NameId>, name: NameId, ) -> Option<ComplexTypeKey>
Look up a complex type by namespace and local name.
Sourcepub fn lookup_element(
&self,
namespace: Option<NameId>,
name: NameId,
) -> Option<ElementKey>
pub fn lookup_element( &self, namespace: Option<NameId>, name: NameId, ) -> Option<ElementKey>
Look up an element by namespace and local name.
Sourcepub fn lookup_attribute(
&self,
namespace: Option<NameId>,
name: NameId,
) -> Option<AttributeKey>
pub fn lookup_attribute( &self, namespace: Option<NameId>, name: NameId, ) -> Option<AttributeKey>
Look up an attribute by namespace and local name.
Sourcepub fn lookup_model_group(
&self,
namespace: Option<NameId>,
name: NameId,
) -> Option<ModelGroupKey>
pub fn lookup_model_group( &self, namespace: Option<NameId>, name: NameId, ) -> Option<ModelGroupKey>
Look up a model group by namespace and local name.
Sourcepub fn lookup_attribute_group(
&self,
namespace: Option<NameId>,
name: NameId,
) -> Option<AttributeGroupKey>
pub fn lookup_attribute_group( &self, namespace: Option<NameId>, name: NameId, ) -> Option<AttributeGroupKey>
Look up an attribute group by namespace and local name.
Sourcepub fn lookup_notation(
&self,
namespace: Option<NameId>,
name: NameId,
) -> Option<NotationKey>
pub fn lookup_notation( &self, namespace: Option<NameId>, name: NameId, ) -> Option<NotationKey>
Look up a notation by namespace and local name.
Sourcepub fn iter(&self) -> impl Iterator<Item = (&ComponentIdentity, &ComponentKey)>
pub fn iter(&self) -> impl Iterator<Item = (&ComponentIdentity, &ComponentKey)>
Iterate over all (identity, key) pairs in the index.
Trait Implementations§
Source§impl Debug for DocumentComponentIndex
impl Debug for DocumentComponentIndex
Source§impl Default for DocumentComponentIndex
impl Default for DocumentComponentIndex
Source§fn default() -> DocumentComponentIndex
fn default() -> DocumentComponentIndex
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DocumentComponentIndex
impl RefUnwindSafe for DocumentComponentIndex
impl Send for DocumentComponentIndex
impl Sync for DocumentComponentIndex
impl Unpin for DocumentComponentIndex
impl UnsafeUnpin for DocumentComponentIndex
impl UnwindSafe for DocumentComponentIndex
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