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
//! Public-API surface snapshot for `decdn-client`, the client SDK (#1150).
//!
//! A third party builds on the SDK surface: the two faces, the setup sequence
//! the crate guide walks through, and every type their signatures name. The
//! snapshot below captures that surface; any diff to it fails CI and shows up as
//! a reviewable `.snap` change.
//!
//! The CLI and the node's cache-miss leg also reach the pull engine's seams.
//! Those items are `#[doc(hidden)]`, so rustdoc and this snapshot leave them
//! out, and they carry no stability promise. An item no other crate uses stays
//! `pub(crate)`.
//!
//! The snapshot renders the default feature set. The `test-util` doubles are not
//! part of the SDK contract, so they stay out of it.
//!
//! Gated behind the `public-api-test` feature (see this crate's `Cargo.toml`)
//! so it stays out of the default `cargo nextest --workspace` coverage run. Run
//! or update it with:
//!
//! ```text
//! INSTA_UPDATE=always cargo nextest run -p decdn-client --features public-api-test
//! ```
//!
//! The toolchain notes in `crates/protocol/tests/public_api.rs` apply here too:
//! the rustdoc JSON comes from the pinned stable toolchain via
//! `RUSTC_BOOTSTRAP=1`, so a toolchain bump can require a `public-api` bump and a
//! regenerated `.snap` in the same PR.
use Error;