Module stateful_function

Module stateful_function 

Source
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:

§Author

Haixing Hu

Structs§

ArcConditionalStatefulFunction
ArcConditionalStatefulFunction struct
ArcStatefulFunction
ArcStatefulFunction - thread-safe function wrapper
BoxConditionalStatefulFunction
BoxConditionalStatefulFunction struct
BoxStatefulFunction
BoxStatefulFunction - stateful function wrapper based on Box<dyn FnMut>
RcConditionalStatefulFunction
RcConditionalStatefulFunction struct
RcStatefulFunction
RcStatefulFunction - single-threaded function wrapper

Traits§

FnStatefulFunctionOps
Extension trait for closures implementing the base function trait
StatefulFunction
StatefulFunction trait - transforms values from type T to type R with state