rusty-cat 0.2.0

Async HTTP client for resumable file upload and download.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use tokio_util::sync::CancellationToken;

#[derive(Debug, Clone)]
pub(crate) struct ActiveState {
    cancel: CancellationToken,
}

impl ActiveState {
    pub(crate) fn new(cancel: CancellationToken) -> Self {
        Self { cancel }
    }

    pub(crate) fn cancel(&self) -> &CancellationToken {
        &self.cancel
    }
}