1use super::*;
2
3impl IAsyncAction {
4 pub fn when<F>(&self, op: F) -> Result<()>
6 where
7 F: FnOnce(Result<()>) + Send + 'static,
8 {
9 Async::when(self, op)
10 }
11}
12
13impl<T: RuntimeType> IAsyncOperation<T> {
14 pub fn when<F>(&self, op: F) -> Result<()>
16 where
17 F: FnOnce(Result<T>) + Send + 'static,
18 {
19 Async::when(self, op)
20 }
21}
22
23impl<P: RuntimeType> IAsyncActionWithProgress<P> {
24 pub fn when<F>(&self, op: F) -> Result<()>
26 where
27 F: FnOnce(Result<()>) + Send + 'static,
28 {
29 Async::when(self, op)
30 }
31}
32
33impl<T: RuntimeType, P: RuntimeType> IAsyncOperationWithProgress<T, P> {
34 pub fn when<F>(&self, op: F) -> Result<()>
36 where
37 F: FnOnce(Result<T>) + Send + 'static,
38 {
39 Async::when(self, op)
40 }
41}