InstructionChainMixin<C extends Cell, I extends Pulse, O extends Pulse> mixin

A mixin that provides the core execution engine for composite instructions.

InstructionChainMixin encapsulates the logic required to orchestrate a sequence of instructions, managing the data flow between stages and providing automated error resilience.

When to use

This mixin is intended for use by composite instruction implementations that need to execute multiple logic units. It handles both default sequential execution and custom orchestration strategies.

How it works

  1. Entry Point: The call method resolves the execution logic from the underlying configuration.
  2. Sequential Evaluation: It iterates through the instruction set, passing the output of one stage as the input to the next.
  3. Synchronous Processing: All instructions execute synchronously. Each instruction's result is immediately passed to the next.
  4. Result Normalization: It performs dynamic type checking to ensure the signal conforms to the expected output type.
  5. Future Propagation: It manages the future callback chain for asynchronous continuation.

Type Parameters:

  • C: The type of the host Cell.
  • I: The type of the incoming Pulse.
  • O: The type of the resulting Pulse.
Superclass constraints

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(I pulse, {C? cell, void future({required Pulse? result, required dynamic token})?, dynamic token}) → O?
Executes the transformation chain synchronously with future propagation support.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator +(covariant Instruction<Cell, Pulse, Pulse> other) → Instruction<C, I, O>
Combines this rule with another to create a InstructionChain.
inherited
operator ==(Object other) → bool
The equality operator.
inherited