pub struct CatalogView {
pub components: IndexMap<String, ComponentDef>,
pub enums: IndexMap<String, Vec<String>>,
pub defs: IndexMap<String, DefSchema>,
pub macros: IndexMap<String, MacroDef>,
pub extension_ids: Vec<String>,
pub owner: IndexMap<String, String>,
}Expand description
The core merged with registered extensions. Extension names never shadow
a core name (define_extension refuses that), so a plain overlay is exact.
Fields§
§components: IndexMap<String, ComponentDef>§enums: IndexMap<String, Vec<String>>§defs: IndexMap<String, DefSchema>§macros: IndexMap<String, MacroDef>§extension_ids: Vec<String>The extension ids this view was built with, in registration order.
owner: IndexMap<String, String>Extension component name → the extension id that defines it.
Implementations§
Source§impl CatalogView
impl CatalogView
Sourcepub fn core() -> Arc<CatalogView> ⓘ
pub fn core() -> Arc<CatalogView> ⓘ
The core alone (shared, built once).
Sourcepub fn with(extensions: &[ExtensionDef]) -> Arc<CatalogView> ⓘ
pub fn with(extensions: &[ExtensionDef]) -> Arc<CatalogView> ⓘ
The core plus the given extensions (the core alone when none).
pub fn component(&self, name: &str) -> Option<&ComponentDef>
Sourcepub fn knows_catalog(&self, catalog_id: &str) -> bool
pub fn knows_catalog(&self, catalog_id: &str) -> bool
Is catalog_id one this view can reduce (core, lite, basic, an extension)?
Sourcepub fn extension_of(&self, component: &str) -> Option<&str>
pub fn extension_of(&self, component: &str) -> Option<&str>
The extension that owns component, if it is not a core one.
Trait Implementations§
Source§impl Clone for CatalogView
impl Clone for CatalogView
Auto Trait Implementations§
impl Freeze for CatalogView
impl RefUnwindSafe for CatalogView
impl Send for CatalogView
impl Sync for CatalogView
impl Unpin for CatalogView
impl UnsafeUnpin for CatalogView
impl UnwindSafe for CatalogView
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