|
1 | 1 | //! Adaptors between compression crates and Rust's modern asynchronous IO types.
|
2 | 2 | //!
|
3 |
| -//! |
| 3 | +
|
4 | 4 | //! # Feature Organization
|
5 | 5 | //!
|
6 | 6 | //! This crate is divided up along two axes, which can each be individually selected via Cargo
|
|
11 | 11 | //!
|
12 | 12 | //! If you want to pull in everything there are three group features defined:
|
13 | 13 | //!
|
| 14 | +
|
14 | 15 | //! Feature | Does
|
15 | 16 | //! ---------|------
|
16 | 17 | //! `all` | Activates all implementations and algorithms.
|
17 | 18 | //! `all-implementations` | Activates all implementations, needs to be pared with a selection of algorithms
|
18 | 19 | //! `all-algorithms` | Activates all algorithms, needs to be pared with a selection of implementations
|
19 | 20 | //!
|
| 21 | +
|
20 | 22 | //! ## IO implementation
|
21 | 23 | //!
|
22 | 24 | //! The first division is which underlying asynchronous IO trait will be wrapped, these are
|
23 | 25 | //! available as separate features that have corresponding top-level modules:
|
24 | 26 | //!
|
| 27 | +
|
25 | 28 | //! Feature | Type
|
26 | 29 | //! ---------|------
|
27 | 30 | // TODO: Kill rustfmt on this section, `#![rustfmt::skip::attributes(cfg_attr)]` should do it, but
|
|
51 | 54 | doc = "`stream` (*inactive*) | `futures::stream::Stream<Item = std::io::Result<bytes::Bytes>>`"
|
52 | 55 | )]
|
53 | 56 | //!
|
54 |
| -//! |
| 57 | +
|
55 | 58 | //! ## Compression algorithm
|
56 | 59 | //!
|
57 | 60 | //! The second division is which compression schemes to support, there are currently a few
|
58 | 61 | //! available choices, these determine which types will be available inside the above modules:
|
59 | 62 | //!
|
60 |
| -#![cfg_attr(feature = "brotli", doc = "* `brotli`")] |
61 |
| -#![cfg_attr(not(feature = "brotli"), doc = "* `brotli` (*inactive*)")] |
62 |
| -#![cfg_attr(feature = "bzip", doc = "* `bzip`")] |
63 |
| -#![cfg_attr(not(feature = "bzip"), doc = "* `bzip` (*inactive*)")] |
64 |
| -#![cfg_attr(feature = "deflate", doc = "* `deflate`")] |
65 |
| -#![cfg_attr(not(feature = "deflate"), doc = "* `deflate` (*inactive*)")] |
66 |
| -#![cfg_attr(feature = "gzip", doc = "* `gzip`")] |
67 |
| -#![cfg_attr(not(feature = "gzip"), doc = "* `gzip` (*inactive*)")] |
68 |
| -#![cfg_attr(feature = "zlib", doc = "* `zlib`")] |
69 |
| -#![cfg_attr(not(feature = "zlib"), doc = "* `zlib` (*inactive*)")] |
70 |
| -#![cfg_attr(feature = "zstd", doc = "* `zstd`")] |
71 |
| -#![cfg_attr(not(feature = "zstd"), doc = "* `zstd` (*inactive*)")] |
| 63 | +
|
| 64 | +//! Feature | Types |
| 65 | +//! ---------|------ |
| 66 | +#, [`BrotliDecoder`](?search=BrotliDecoder)" |
| 69 | +)] |
| 70 | +#![cfg_attr( |
| 71 | + not(feature = "brotli"), |
| 72 | + doc = "`brotli` (*inactive*) | `BrotliEncoder`, `BrotliDecoder`" |
| 73 | +)] |
| 74 | +#, [`BzDecoder`](?search=BzDecoder)" |
| 77 | +)] |
| 78 | +#![cfg_attr( |
| 79 | + not(feature = "bzip"), |
| 80 | + doc = "`bzip` (*inactive*) | `BzEncoder`, `BzDecoder`" |
| 81 | +)] |
| 82 | +#, [`DeflateDecoder`](?search=DeflateDecoder)" |
| 85 | +)] |
| 86 | +#![cfg_attr( |
| 87 | + not(feature = "deflate"), |
| 88 | + doc = "`deflate` (*inactive*) | `DeflateEncoder`, `DeflateDecoder`" |
| 89 | +)] |
| 90 | +#, [`GzipDecoder`](?search=GzipDecoder)" |
| 93 | +)] |
| 94 | +#![cfg_attr( |
| 95 | + not(feature = "gzip"), |
| 96 | + doc = "`gzip` (*inactive*) | `GzipEncoder`, `GzipDecoder`" |
| 97 | +)] |
| 98 | +#, [`ZlibDecoder`](?search=ZlibDecoder)" |
| 101 | +)] |
| 102 | +#![cfg_attr( |
| 103 | + not(feature = "zlib"), |
| 104 | + doc = "`zlib` (*inactive*) | `ZlibEncoder`, `ZlibDecoder`" |
| 105 | +)] |
| 106 | +#, [`ZstdDecoder`](?search=ZstdDecoder)" |
| 109 | +)] |
| 110 | +#![cfg_attr( |
| 111 | + not(feature = "zstd"), |
| 112 | + doc = "`zstd` (*inactive*) | `ZstdEncoder`, `ZstdDecoder`" |
| 113 | +)] |
72 | 114 | //!
|
73 | 115 |
|
74 | 116 | #![cfg_attr(docsrs, feature(doc_cfg))]
|
|
0 commit comments