Skip to main content

Module function

Module function 

Source
Expand description

Function nodes: nodes that run a function body.

Structs§

FunctionNode
A node that runs a function. The constructors return it as Arc<dyn Node>.

Functions§

emitting_function_node
A function node whose body can emit intermediate events (progress, a RequestInput) through Emit before returning its output.
emitting_function_node_with_schema
As emitting_function_node, with input and output schemas.
function_node
A node that runs f on its (converted) input.
function_node_from_state
A node whose Params struct is filled from session state, one field per state key (name the key with #[serde(rename = "key")]); a field named node_input receives the node’s input instead. The output schema is inferred from Out.
function_node_with_schema
As function_node, with input and output schemas.

Type Aliases§

Emit
The callback an emitting node body uses: forwards an event to the node’s consumer and resolves once the consumer took it (an error once the consumer is gone).