Expand description
FromStr-backed value parsers for the command tree.
clap turns each of these into a typed argument, so a bad value is reported against the flag or positional that carried it instead of being re-checked by hand after parsing. The parsing rules themselves are unchanged from the hand-rolled tool these replaced.
Structs§
- Duty
Limit Arg - A raw duty limit on the 0-65535 scale, or
offto stop enforcing one. - Filter
Arg dest-hint:HHHHHH,channel-id:HHHH, orpkt-type:N(:or whitespace between type and value).- HexU16
Arg - A 16-bit value written in decimal or hex (
0x1424). - KeyArg
- A 32-byte public key or channel key, written as base58 or hex.
- MinRssi
Arg - A received-signal floor in dBm, or
noneto forward regardless. - MinSnr
Arg - A signal-to-noise floor in dB, or
noneto forward regardless. - OnOff
Arg - An
on/offswitch, also accepting thetrue/falseand1/0spellings the provisioning file has always allowed. - OptRegion
Arg - One region code, or
noneto clear the setting. - PeerArg
PUB,KENC,KMIC(or whitespace-separated): a peer public key and the two 16-byte pairwise secrets, hex.- PinArg
- A 6-digit BLE pairing PIN, or
clearto remove the stored one. - Region
List Arg - A comma-separated region list, or
nonefor the empty list — which means “no regional restriction”, not a region named “none”.
Functions§
- parse_
bool - parse_
hex - parse_
key32 - parse_
region 🔒 - Parse one region code, rejecting the empty element a stray comma
leaves behind. Anything that is not an airport code or
0xliteral is hashed as a region name, so this only fails on empty input. - parse_
u32 - A number written in decimal or with an
0xprefix.