Crate chain_reaction

Source
Expand description

§chain_reaction

This library provides a flexible and composable way to build data processing pipelines. It includes the Reactor and TimedReactor structs for building and executing these pipelines, along with various traits and helper functions.

Structs§

Chain
The Chain struct represents a sequence of two actions.
Reactor
The Reactor struct represents a data processing pipeline.
TimedReactor
The TimedReactor struct extends Reactor with timing capabilities.

Enums§

Either
An enum representing either a left or right value.
Failure
A generic enum representing various types of failures that can occur in the Reactor pipeline.

Traits§

Act
The Act trait defines the core behavior for all actions in the Reactor pipeline.
ChainableAct
The ChainableAct trait extends Act with the ability to chain actions together.

Functions§

add_one
Adds one to the input number.
divide
Divides the first number by the second, returning an error for division by zero.
double
Doubles the input number.
square
Squares the input number, returning an error for negative inputs.
to_string
Converts the input number to a string.

Type Aliases§

Out
A type alias for the Result type used throughout the library. O is the output type, and E is the error type (defaulting to Failure).