pub struct FuncRegistry { /* private fields */ }Expand description
Read-only function registry shared by the evaluator across components.
Construct via FuncRegistryBuilder. The registry is intentionally
not extendable post-construction so the function table is a stable
&'static-shaped object — every later operation against it is a
concurrent read.
Implementations§
Source§impl FuncRegistry
impl FuncRegistry
Sourcepub fn iter(&self) -> impl Iterator<Item = (&Arc<str>, &Arc<dyn HclFunc>)>
pub fn iter(&self) -> impl Iterator<Item = (&Arc<str>, &Arc<dyn HclFunc>)>
Iterate over (name, func) pairs in arbitrary order. Used by
diagnostics (“here’s the function table the evaluator saw”).
Sourcepub fn to_builder(&self) -> FuncRegistryBuilder
pub fn to_builder(&self) -> FuncRegistryBuilder
Start a builder from this registry’s contents. Used when the spec wants “stdlib + overrides”.
Sourcepub fn default_with_stdlib() -> Self
pub fn default_with_stdlib() -> Self
Build a registry pre-loaded with the Phase 4 default function set:
HCL stdlib, Terraform-only functions, and the sandboxed file
functions (file / fileexists / templatefile / fileset). The
sandbox helpers operate on the workspace root supplied via
CallCx::workspace_root at call time — no closure state.
Sourcepub fn builder() -> FuncRegistryBuilder
pub fn builder() -> FuncRegistryBuilder
Start an empty registry builder.