fui_core 0.18.0

Core library of FUI MVVM UI Framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
///
/// JoinHandle will abort the task when dropped.
///
pub struct JoinHandle<T> {
    handle: tokio::task::JoinHandle<T>,
}

impl<T> JoinHandle<T> {
    pub fn new(handle: tokio::task::JoinHandle<T>) -> Self {
        JoinHandle { handle }
    }
}

impl<T> Drop for JoinHandle<T> {
    fn drop(&mut self) {
        self.handle.abort();
    }
}