pub struct ContainerDef {
pub id: DefinitionId,
pub scope_id: DefinitionId,
pub name: Option<NameId>,
pub bytecode: Vec<u8>,
pub counting_flags: CountingFlags,
pub path_hash: i32,
pub param_count: u8,
}Expand description
A compiled container (knot, stitch, gather, or anonymous flow block).
Fields§
§id: DefinitionId§scope_id: DefinitionIdThe lexical scope this container belongs to.
For scope containers (root, knot, stitch): scope_id == id.
For child containers (gather, choice target, sequence, etc.): scope_id is
the enclosing scope’s DefinitionId.
name: Option<NameId>Human-readable name for scope-owning containers (root, knot, stitch).
None for child containers.
bytecode: Vec<u8>§counting_flags: CountingFlags§path_hash: i32Sum of char values from the container’s ink path string. Used to seed the RNG for shuffle sequences.
param_count: u8Number of parameters this container declares (a parameterized knot,
stitch, or function — e.g. === call(action, present) === has 2). The
container’s prologue binds them with that many leading DeclareTemps.
0 for the vast majority of containers. Lets the runtime arity-check a
host-directed entry (choose_path_string_with_args) or call_function.
The converter reference pipeline leaves this 0 (inklecate’s JSON does
not expose it); only the brink compiler populates the true count.
Trait Implementations§
Source§impl Clone for ContainerDef
impl Clone for ContainerDef
Source§fn clone(&self) -> ContainerDef
fn clone(&self) -> ContainerDef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ContainerDef
impl Debug for ContainerDef
Source§impl PartialEq for ContainerDef
impl PartialEq for ContainerDef
Source§fn eq(&self, other: &ContainerDef) -> bool
fn eq(&self, other: &ContainerDef) -> bool
self and other values to be equal, and is used by ==.