qubit_function/functions/stateful_function/fn_stateful_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 `FnStatefulFunctionOps` public type.
12
13use super::{
14 BoxConditionalStatefulFunction,
15 BoxStatefulFunction,
16 Predicate,
17 StatefulFunction,
18 impl_fn_ops_trait,
19};
20
21// ============================================================================
22// FnStatefulFunctionOps - Extension trait for closure functions
23// ============================================================================
24
25// Generates: FnStatefulFunctionOps trait and blanket implementation
26impl_fn_ops_trait!(
27 (FnMut(&T) -> R),
28 FnStatefulFunctionOps,
29 BoxStatefulFunction,
30 StatefulFunction,
31 BoxConditionalStatefulFunction
32);