Receptor<C extends Cell, I extends Signal, O extends Signal> class abstract interface

The signal processing engine of a Cell, transforming incoming signals into outputs.

A Receptor defines how a cell:

  1. Accepts input signals of type I
  2. Transforms them via custom logic
  3. Produces output signals of type O
  4. Propagates results through synapses

Core Concepts:

  • Signal Flow: Input → Transformation → Output → Propagation
  • Type Safety: Strict input/output signal typing
  • Context Awareness: Cell and user context available
  • Error Handling: Built-in exception protection

Example:

final doubler = Receptor<Cell, int, int>(
  transform: ({cell, signal, user}) => signal * 2,
  user: context
);

Type Parameters:

  • C: The cell type (must extend Cell)
  • I: Input signal type (must extend Signal)
  • O: Output signal type (must extend Signal)
Implementers

Constructors

Receptor.new({SignalTransform<C, I, O>? transform, dynamic user})
Creates a signal receptor with transformation logic.
const
factory

Properties

async Receptor<C, I, O>
Asynchronously processes a signal through this receptor
no setter
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({required covariant C cell, required covariant I signal, Set<Cell>? notified}) → dynamic
Processes a signal through the receptor pipeline.
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 ==(Object other) bool
The equality operator.
inherited

Constants

unchanged → const _Receptor<Cell, Signal, Signal>
The identity receptor that passes signals unchanged