Module mapper

Module mapper 

Source
Expand description

§Mapper Types

Provides Rust implementations of mapper traits for stateful value transformation. Mappers consume input values (taking ownership) and produce output values while allowing internal state modification.

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

  • BoxMapper: Single ownership, not cloneable
  • ArcMapper: Thread-safe shared ownership, cloneable
  • RcMapper: Single-threaded shared ownership, cloneable

§Author

Haixing Hu

Structs§

ArcConditionalMapper
ArcConditionalMapper struct
ArcMapper
ArcMapper - thread-safe mapper wrapper
BoxConditionalMapper
BoxConditionalMapper struct
BoxMapper
BoxMapper - mapper wrapper based on Box<dyn FnMut>
RcConditionalMapper
RcConditionalMapper struct
RcMapper
RcMapper - single-threaded mapper wrapper

Traits§

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