Module stateful_transformer

Module stateful_transformer 

Source
Expand description

§StatefulTransformer Types

Provides Rust implementations of stateful transformer traits for stateful value transformation. StatefulTransformers consume input values (taking ownership) and produce output values while allowing internal state modification. This is analogous to FnMut(T) -> R in Rust’s standard library.

This module provides the StatefulTransformer<T, R> trait and three implementations:

§Author

Haixing Hu

Structs§

ArcConditionalStatefulTransformer
ArcConditionalStatefulTransformer struct
ArcStatefulTransformer
ArcStatefulTransformer - thread-safe transformer wrapper
BoxConditionalStatefulTransformer
BoxConditionalStatefulTransformer struct
BoxStatefulTransformer
BoxStatefulTransformer - transformer wrapper based on Box<dyn FnMut>
RcConditionalStatefulTransformer
RcConditionalStatefulTransformer struct
RcStatefulTransformer
RcStatefulTransformer - single-threaded transformer wrapper

Traits§

FnStatefulTransformerOps
Extension trait for closures implementing FnMut(T) -> R
StatefulTransformer
StatefulTransformer trait - transforms values from type T to type R with state