Add CLI argument documentation
This commit is contained in:
parent
aa07b193b6
commit
5047931d17
1 changed files with 4 additions and 0 deletions
|
@ -19,15 +19,19 @@ pub struct AppSettings {
|
||||||
#[command(flatten)]
|
#[command(flatten)]
|
||||||
source: Source,
|
source: Source,
|
||||||
|
|
||||||
|
/// The port the app should listen for connections on
|
||||||
#[arg(short, long, default_value = "25565")]
|
#[arg(short, long, default_value = "25565")]
|
||||||
port: u16,
|
port: u16,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The source for the world configuration, either an existing world from a peer, a specific seed, or none (which implies a random seed)
|
||||||
#[derive(Args)]
|
#[derive(Args)]
|
||||||
#[group(required = false, multiple = false)]
|
#[group(required = false, multiple = false)]
|
||||||
struct Source {
|
struct Source {
|
||||||
|
/// Passing the same seed will always generate the same world
|
||||||
#[arg(short, long)]
|
#[arg(short, long)]
|
||||||
seed: Option<Seed>,
|
seed: Option<Seed>,
|
||||||
|
/// <ip>:<port> to a peer's world
|
||||||
#[arg(short, long)]
|
#[arg(short, long)]
|
||||||
connect: Option<SocketAddr>,
|
connect: Option<SocketAddr>,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue