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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
use crateAppConfig;
use Runtime;
/// Defines the **preflight wiring** stage of a Strut application.
///
/// This represents the final step in the startup sequence, executed immediately
/// before the application's main asynchronous logic begins. It has access to
/// both the finalized [`AppConfig`] and the configured Tokio [`Runtime`].
///
/// This stage is ideal for performing final checks or logging startup
/// announcements.
///
/// ## Customization example
///
/// You can replace the default wiring to customize or suppress the standard
/// startup announcement.
///
/// ```
/// use strut::{App, AppConfig, PreflightWiring};
/// use tokio::runtime::Runtime;
///
/// fn main() {
/// App::launchpad(async_main())
/// .with_preflight_wiring(CustomPreflightWiring)
/// .boot();
/// }
///
/// async fn async_main() {
/// println!("Executing the main logic");
/// }
///
/// struct CustomPreflightWiring;
///
/// impl PreflightWiring for CustomPreflightWiring {
/// fn announce_startup(&self, _config: &'static AppConfig, _runtime: &Runtime) {
/// // Don’t announce startup
/// }
/// }
/// ```
/// The default `PreflightWiring` implementation used by Strut.
///
/// This struct simply uses the default behavior provided by the
/// `PreflightWiring` trait methods.
pub ;