MCPcopy Create free account
hub / github.com/Notgnoshi/generative / CmdlineOptions

Class CmdlineOptions

tools/bitwise.rs:14–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12#[derive(Debug, Parser)]
13#[clap(name = "bitwise", verbatim_doc_comment)]
14struct CmdlineOptions {
15 /// The log level
16 #[clap(short, long, default_value_t = tracing::Level::INFO)]
17 log_level: tracing::Level,
18
19 /// Output file to write result to. Defaults to stdout.
20 #[clap(short, long)]
21 output: Option<PathBuf>,
22
23 /// Whether to output points or connected lines
24 #[clap(long, default_value_t = false)]
25 points: bool,
26
27 /// Maximum x coordinate
28 #[clap(short = 'x', long, default_value_t = 0)]
29 x_min: i64,
30
31 /// Maximum x coordinate
32 #[clap(short = 'X', long, default_value_t = 48)]
33 x_max: i64,
34
35 /// Minimum y coordinate
36 #[clap(short = 'y', long, default_value_t = 0)]
37 y_min: i64,
38
39 /// Maximum y coordinate
40 #[clap(short = 'Y', long, default_value_t = 48)]
41 y_max: i64,
42
43 /// The order to search adjacent cells for neighbors. Comma separated.
44 #[clap(short, long,
45 use_value_delimiter = true,
46 value_delimiter = ',',
47 default_values_t = [Neighbor::East, Neighbor::SouthEast, Neighbor::South, Neighbor::SouthWest]
48 )]
49 neighbor_search_order: Vec<Neighbor>,
50
51 /// A valid Rust expression taking 'x' and 'y', and returning an i64
52 #[clap(default_value = "(x & y) & (x ^ y) % 13")]
53 expression: String,
54}
55
56type BitwiseExpression = Box<dyn Fn(i64, i64) -> i64>;
57

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected