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
//! Lifecycle error types for the status server.
//!
//! [`StatusServerLifecycleError`] is returned by
//! [`super::spawn_status_server`] and [`super::StatusServerHandle::shutdown`]
//! so callers can branch on bind / serve / background-task failures
//! without resorting to string matching against an opaque `anyhow::Error`.
//!
//! Note: the `super::` references are written as plain code spans rather than
//! rustdoc intra-doc links because the parent `status_server` module is
//! private; rustdoc's `private-intra-doc-links` lint (escalated to error by
//! CI's `RUSTDOCFLAGS="-D warnings"` setting) would reject the bracketed
//! `super::...` form.
use Error;
/// Lifecycle errors for `spawn_status_server` and `StatusServerHandle::shutdown`.
///
/// Typed (rather than `anyhow::Error`) so library callers can branch on the
/// failure mode (port already bound, server-loop crash, background-task
/// panic) without parsing error messages.
///
/// Marked `#[non_exhaustive]` so adding new failure modes is not breaking.