Clap: custom collection instead of Vec
โ Rust ๐ 2025-06-30 ๐ค surdeus ๐๏ธ 20Hello Everybody,
I know I can parse multiple arguments in Clap into Vec<T> - for example clap/examples/escaped-positional-derive.rs at master ยท clap-rs/clap ยท GitHub
I also know I can use #[arg(last = true, value_parser = |inp: &str| ... with a function that will be applied on each T in Vec<T>.
But I can't figure out if I can somehow pass the whole collection/iterator to a function. For example if I want to get VecDeque<T> without converting it afterwards from Vec<T>. Is that possible?
Thank you.
1 post - 1 participant
๐ท๏ธ rust_feed