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
//! Tokio-based async I/O traits for the library-side async surface.
//!
//! The existing sync APIs remain the default path in `mp4forge`. The first async rollout is
//! intentionally limited to seekable library readers and writers such as Tokio file handles or
//! in-memory buffers. Later queue-backed follow-ons can also use the forward-only async reader
//! and writer aliases in this module when a surface can operate progressively without seeks. The
//! CLI continues to use the sync surface.
/// Tokio async read trait used by the library-side async surface.
pub use AsyncRead;
/// Tokio async seek trait used by the library-side async surface.
pub use AsyncSeek;
/// Tokio async write trait used by the library-side async surface.
pub use AsyncWrite;
/// Async reader alias for forward-only library inputs.
///
/// Queue-backed progressive flows can use this bound when they only need incremental reads and do
/// not require random-access seeks. The alias still requires `Send` so callers can move
/// independent I/O jobs onto Tokio worker threads safely.
/// Async writer alias for forward-only library outputs.
///
/// This alias covers additive async write surfaces that can emit bytes progressively without
/// later header backfill seeks, while still requiring `Send` for multithreaded Tokio tasks.
/// Async reader alias for seekable library inputs.
///
/// The first async rollout targets inputs that support both asynchronous reads and random-access
/// seeks. Non-seekable streams are intentionally excluded from this initial surface, and the
/// additive async reader path requires `Send` so callers can move independent file work onto Tokio
/// worker threads.
/// Async writer alias for seekable library outputs.
///
/// `mp4forge` write flows backfill box headers after payload bytes are written, so the async write
/// surface also requires seek support instead of treating outputs as one-way streams. The async
/// writer path also requires `Send` so independent write jobs can move across Tokio worker
/// threads.