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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! WHATWG Streams implementation for Rust
//!
//! This crate provides an implementation of the WHATWG Streams Standard in Rust.
//!
//! ## Features
//!
//! - **`send` (default)**: Multi-threaded streams using `Arc` (requires `Send + Sync`)
//! - **`local`**: Single-threaded streams using `Rc` (no `Send + Sync` required)
//!
//! ## Examples
//!
//! ### Multi-threaded (default)
//!
//! ```toml
//! [dependencies]
//! whatwg_streams = "0.1"
//! ```
//!
//! ### Single-threaded (WASM or LocalSet)
//!
//! ```toml
//! [dependencies]
//! whatwg_streams = { version = "0.1", default-features = false, features = ["local"] }
//! ```
// Ensure mutual exclusion of features
compile_error!;
// Ensure at least one feature is enabled
compile_error!;
// Platform abstraction layer
// Unified streams implementation
// Re-export everything from streams
pub use *;
// Byte streams surface `Bytes`/`BytesMut` in their public API (reads yield `Bytes`,
// enqueue takes `impl Into<Bytes>`, `read_owned` transfers a `BytesMut`). Re-exporting
// the crate lets downstream code name those types without taking a separate,
// version-matched dependency on `bytes`.
pub use ;