1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright (c) 2023 Harry [Majored] [hello@majored.pw]
// MIT License (https://github.com/Majored/rs-async-zip/blob/main/LICENSE)
//! A set of [`tokio`]-specific type aliases and features.
//!
//! # Usage
//! With the `tokio` feature enabled, types from the [`base`] implementation will implement additional constructors
//! for use with [`tokio`]. These constructors internally implement conversion between the required async IO traits.
//! They are defined as:
//! - [`base::read::seek::ZipFileReader::with_tokio()`]
//! - [`base::read::stream::ZipFileReader::with_tokio()`]
//! - [`base::write::ZipFileWriter::with_tokio()`]
//!
//! As a result of Rust's type inference, we are able to reuse the [`base`] implementation's types with considerable
//! ease. There only exists one caveat with their use; the types returned by these constructors contain a wrapping
//! compatibility type provided by an external crate. These compatibility types cannot be named unless you also pull in
//! the [`tokio_util`] dependency manually. This is why we've provided type aliases within this module so that they can
//! be named without needing to pull in a separate dependency.
use cratebase;
use tokio;
use tokio_util;