holochain_client 0.8.0-dev.18

A Rust client for the Holochain Conductor API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use tokio::task::AbortHandle;

pub(crate) struct AbortOnDropHandle(AbortHandle);

impl AbortOnDropHandle {
    pub fn new(abort_handle: AbortHandle) -> Self {
        Self(abort_handle)
    }
}

impl Drop for AbortOnDropHandle {
    fn drop(&mut self) {
        self.0.abort();
    }
}