Expand description
§StatefulFunction Types
Provides Rust implementations of stateful function traits for stateful value transformation. StatefulFunctions consume input values (taking ownership) and produce output values while allowing internal state modification.
It is similar to the FnMut(&T) -> R trait in the standard library.
This module provides the StatefulFunction<T, R> trait and three implementations:
BoxStatefulFunction: Single ownership, not cloneableArcStatefulFunction: Thread-safe shared ownership, cloneableRcStatefulFunction: Single-threaded shared ownership, cloneable
§Author
Haixing Hu
Structs§
- ArcConditional
Stateful Function - ArcConditionalStatefulFunction struct
- ArcStateful
Function - ArcStatefulFunction - thread-safe function wrapper
- BoxConditional
Stateful Function - BoxConditionalStatefulFunction struct
- BoxStateful
Function - BoxStatefulFunction - stateful function wrapper based on
Box<dyn FnMut> - RcConditional
Stateful Function - RcConditionalStatefulFunction struct
- RcStateful
Function - RcStatefulFunction - single-threaded function wrapper
Traits§
- FnStateful
Function Ops - Extension trait for closures implementing the base function trait
- Stateful
Function - StatefulFunction trait - transforms values from type T to type R with state