Skip to main content

qubit_function/functions/mutating_function/
fn_mutating_function_ops.rs

1/*******************************************************************************
2 *
3 *    Copyright (c) 2025 - 2026 Haixing Hu.
4 *
5 *    SPDX-License-Identifier: Apache-2.0
6 *
7 *    Licensed under the Apache License, Version 2.0.
8 *
9 ******************************************************************************/
10// qubit-style: allow explicit-imports
11//! Defines the `FnMutatingFunctionOps` public type.
12
13#![allow(unused_imports)]
14
15use super::*;
16
17// =======================================================================
18// 7. Provide extension methods for closures
19// =======================================================================
20
21// Generates: FnFunctionOps trait and blanket implementation
22impl_fn_ops_trait!(
23    (Fn(&mut T) -> R),
24    FnMutatingFunctionOps,
25    BoxMutatingFunction,
26    Function, // chains a non-mutating function after this mutating function
27    BoxConditionalMutatingFunction
28);