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
use StructOpt;
/// A `--port` flag for Structopt.
///
/// This port should be used for unsecured HTTP/1.1 traffic on a TCP port.
///
/// ## Examples
/// ```rust
/// #[derive(Debug, structopt::StructOpt)]
/// struct Cli {
/// #[structopt(flatten)]
/// port: clap_flags::Port,
/// }
/// ```
/// An `--https-port` flag for Structopt.
///
/// This port should be used to listen for both secured HTTP/1.1 and HTTP/2 traffic on a TCP port.
///
/// ## Examples
/// ```rust
/// #[derive(Debug, structopt::StructOpt)]
/// struct Cli {
/// #[structopt(flatten)]
/// https_port: clap_flags::HttpsPort,
/// }
/// ```
/// An `--http3-port` flag for Structopt.
///
/// This port should be used to listen for both HTTP/3 traffic on a UDP port.
///
/// ## Examples
/// ```rust
/// #[derive(Debug, structopt::StructOpt)]
/// struct Cli {
/// #[structopt(flatten)]
/// h3_port: clap_flags::Http3Port,
/// }
/// ```