1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! SourceWithHandle subscription combinator
//!
//! A generic subscription that combines a source subscription with an
//! additional cancelable handle. Used by operators like Debounce, Throttle,
//! and Delay that need to cancel scheduled tasks on unsubscribe.
use Subscription;
/// A subscription combining a source subscription with a cancelable handle.
///
/// When unsubscribed, both the handle and the source are unsubscribed.
/// The `is_closed` check delegates to the source subscription.
///
/// # Type Parameters
///
/// - `U`: The source subscription type
/// - `H`: The handle subscription type (e.g., wrapped TaskHandle)
///
/// # Examples
///
/// ```ignore
/// type DebounceSubscription<U, H> = SourceWithHandle<U, H>;
/// type ThrottleSubscription<U, H> = SourceWithHandle<U, H>;
/// type DelaySubscription<U, H> = SourceWithHandle<U, H>;
/// ```