Expand description
§BiConsumerOnce Types
Provides one-time bi-consumer interface implementations for operations accepting two input parameters without returning a result.
It is similar to the FnOnce(&T, &U) trait in the standard library.
This module provides a unified BiConsumerOnce trait and one concrete
implementation:
BoxBiConsumerOnce<T, U>: Box-based single ownership implementation
§Why No Arc/Rc Variants?
Unlike reusable BiConsumer
implementations, this module does not provide ArcBiConsumerOnce or
RcBiConsumerOnce implementations. This is a design decision based on the
fact that FnOnce semantics require single ownership at the call site,
while Arc and Rc are meant to preserve shared ownership across clones.
§Design Philosophy
BiConsumerOnce uses FnOnce(&T, &U) semantics: for truly one-time
consumption operations.
Unlike BiConsumer, BiConsumerOnce consumes itself on first call. Suitable for initialization callbacks, cleanup callbacks, etc.
Structs§
- BoxBi
Consumer Once - BoxBiConsumerOnce struct
- BoxConditional
BiConsumer Once - BoxConditionalBiConsumerOnce struct
Traits§
- BiConsumer
Once - BiConsumerOnce trait - Unified one-time bi-consumer interface
- FnBi
Consumer Once Ops - Extension trait providing one-time bi-consumer composition methods for closures