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
Chainstruct represents a sequence of two actions. - Reactor
- The
Reactorstruct represents a data processing pipeline. - Timed
Reactor - The
TimedReactorstruct extendsReactorwith 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
Acttrait defines the core behavior for all actions in the Reactor pipeline. - Chainable
Act - The
ChainableActtrait extendsActwith 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.
Ois the output type, andEis the error type (defaulting toFailure).