Module stateful_bi_consumer

Module stateful_bi_consumer 

Source
Expand description

§BiConsumer Types

Provides bi-consumer interface implementations for operations accepting two input parameters without returning a result.

It is similar to the FnMut(&T, &U) trait in the standard library.

This module provides a unified BiConsumer trait and three concrete implementations based on different ownership models:

  • BoxStatefulBiConsumer<T, U>: Box-based single ownership for one-time use
  • ArcStatefulBiConsumer<T, U>: Arc<Mutex<>>-based thread-safe shared ownership
  • RcStatefulBiConsumer<T, U>: Rc<RefCell<>>-based single-threaded shared ownership

§Design Philosophy

BiConsumer uses FnMut(&T, &U) semantics: can modify its own state but does NOT modify input values.

Suitable for statistics, accumulation, and event processing scenarios involving two parameters.

§Author

Haixing Hu

Structs§

ArcConditionalStatefulBiConsumer
ArcConditionalStatefulBiConsumer struct
ArcStatefulBiConsumer
ArcStatefulBiConsumer struct
BoxConditionalStatefulBiConsumer
BoxConditionalBiConsumer struct
BoxStatefulBiConsumer
BoxStatefulBiConsumer struct
RcConditionalStatefulBiConsumer
RcConditionalStatefulBiConsumer struct
RcStatefulBiConsumer
RcStatefulBiConsumer struct

Traits§

FnStatefulBiConsumerOps
Extension trait providing bi-consumer composition methods for closures
StatefulBiConsumer
BiConsumer trait - Unified bi-consumer interface