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. - Timed
Reactor - The
TimedReactor
struct extendsReactor
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. - Chainable
Act - The
ChainableAct
trait extendsAct
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, andE
is the error type (defaulting toFailure
).