rx_rust/disposable/disposable_ext.rs
1use crate::{
2 disposable::Disposable,
3 safe_lock_option_disposable,
4 utils::types::{Mutable, Shared},
5};
6
7impl<D> Disposable for Shared<Mutable<Option<D>>>
8where
9 D: Disposable,
10{
11 fn dispose(self) {
12 safe_lock_option_disposable!(dispose: self);
13 }
14}
15
16#[cfg(feature = "futures")]
17impl Disposable for futures::stream::AbortHandle {
18 fn dispose(self) {
19 self.abort();
20 }
21}