pub struct TemplateTable<'d> { /* private fields */ }Expand description
One entry per unique (module,params) template; templates’ insertion
order is first-seen order during the deterministic DFS walk below —
ST-064’s “identical offsets across runs” precondition falls out of that
determinism, not a separate sort.
Implementations§
Source§impl<'d> TemplateTable<'d>
impl<'d> TemplateTable<'d>
Sourcepub fn build(design: &'d Design) -> Result<TemplateTable<'d>, LayoutError>
pub fn build(design: &'d Design) -> Result<TemplateTable<'d>, LayoutError>
Walks every concrete instance reachable from design.top_instances()
(ST-059), assigning each a TemplateKey via hash-then-verify dedup
(ST-065) and recording the DFS visitation order (ST-064).
Sourcepub fn layout_of(&self, key: &TemplateKey) -> Option<&StateLayout>
pub fn layout_of(&self, key: &TemplateKey) -> Option<&StateLayout>
Template-relative layout lookup — never a per-instance storage offset (ST-066: sharing a template means sharing layout, never storage; per-instance base assignment is Task 7’s job, not this module’s).
Sourcepub fn walk_order(&self) -> impl Iterator<Item = &TemplateKey>
pub fn walk_order(&self) -> impl Iterator<Item = &TemplateKey>
The exact DFS order concrete instances were discovered in (ST-064) — one entry per concrete instance, not one per unique template.