1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use cote::prelude::*; #[derive(Debug, Cote, PartialEq, Eq)] #[cote(embedded)] pub struct Cli { foo: String, } fn main() -> Result<(), aopt::Error> { let cli = Cli::parse(Args::from(["app", "--foobar"]))?; assert_eq!(cli.foo, "bar"); Ok(()) }