Expand description
§cond module
§Concept of Conditions
- Each task has multiple inputs (called conditions)
- Each function has multiple inputs (called parameters)
- A task can be described by a function, where its conditions correspond to the function’s parameters
§Locating a Condition
The CondAddr<T> type serves as a logical address that uniquely identifies a condition’s location and type.
It contains four components:
taskid: Identifies which task the condition belongs to (see:TaskId)cond_index: The index of the condition within its task (see:ArgIdx)section: Identifies the interface section (input or output) for this parameter (see:Section)Type: The built-in data type of the condition (expressed through the generic parameterT)
§How These Components Work Together
- Components 1-3 form a logical address that specifies where to find the condition
- Component 4 provides type annotation that specifies what type of data to expect
§Important Note
This is purely a descriptive address, serving only to identify the location and type of the data,
not itself to provide access to the data itself. Actual data access requires separate mechanisms
and is not implemented via [Deref] or similar traits on this type.
This combination provides a complete, type-safe way to identify task conditions.
Structs§
- ArgIdx
- A zero-based index representing the position of a parameter in a function or closure signature.
- Cond
Addr - Logical address identifying the location and type of a condition within the system.
- TaskId
- A unique identifier for a task within a given pool instance system.
Enums§
- Section
- Specifies the position context of an argument within a task’s interface.