1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// SPDX-License-Identifier: EUPL-1.2 use pound::Parse; fn parse_bool(_: &str) -> Result<bool, &'static str> { Ok(true) } #[derive(Parse)] struct Cli { #[pound(long, parse = "parse_bool")] flag: bool, } fn main() {}