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
56
57
58
59
//! The transport seam (arch §4.1, §9.1): the ONE impure surface. `bz` wires the
//! rustls-backed `HttpTransport`; tests wire `MockTransport`. A blocking,
//! incremental body iterator keeps the pipeline a pure `Iterator`, never async.
use io;
use crateCanonicalError;
use crateWireRequest;
/// One transport body chunk. An alias, so the framers' `Vec<u8>` and the body
/// stream speak the same type.
pub type Bytes = ;
/// The peeked HTTP status (read even under `--raw`, for exit-code correctness)
/// plus the blocking, incremental body stream (arch §4.1).
/// The per-request transport budgets (config §4.3), in WHOLE SECONDS; each `None`
/// leaves that bound unset (the transport's own default). ureq's three phase
/// budgets — the seam's internal vocabulary, NOT the config surface: the resolved
/// config carries ONE `timeout` (the silence budget), and `ResolvedConfig::timeouts()`
/// FANS it onto all three here (all equal, or all `None`), so the collapse to one
/// knob is a surface fact and the fan is observable at this seam (arch §13.15).
/// Carried on the [`WireRequest`] — the one thing crossing the seam — so config-
/// sourced policy reaches the impure transport without widening the `send` signature.
/// The one number lives in config (floor `data/defaults.toml`), never as magic in the
/// bin (severability — policy in config, not core).
///
/// - `connect`: cap on establishing the connection (DNS/TCP/TLS).
/// - `response`: cap on awaiting the response headers — **not** the body.
/// - `idle`: the INTER-CHUNK bound on the streaming body, reset on every chunk.
/// It bounds a provider that sends headers then stalls mid-stream without
/// capping total stream length, so a long-but-live generation is never
/// truncated (a *total* body cap, ureq's `timeout_recv_body`, would be wrong).
/// The single network seam (arch §4.1). Object-safe; `Send + Sync` so an impl is
/// shareable. Exactly one round-trip per process — a caller wanting N concurrent
/// requests spawns N `bz`.