#[derive(Debug)] pub(crate) struct XFlags { pub(crate) src: Option, pub(crate) cmd: Cmd, } #[derive(Debug)] pub(crate) struct Cmd { pub(crate) name: String, pub(crate) doc: Option, pub(crate) args: Vec, pub(crate) flags: Vec, pub(crate) subcommands: Vec, pub(crate) default: bool, } #[derive(Debug)] pub(crate) struct Arg { pub(crate) arity: Arity, pub(crate) doc: Option, pub(crate) val: Val, } #[derive(Debug)] pub(crate) struct Flag { pub(crate) arity: Arity, pub(crate) name: String, pub(crate) short: Option, pub(crate) doc: Option, pub(crate) val: Option, } #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub(crate) enum Arity { Optional, Required, Repeated, } #[derive(Debug)] pub(crate) struct Val { pub(crate) name: String, pub(crate) ty: Ty, } #[derive(Debug)] pub(crate) enum Ty { PathBuf, OsString, FromStr(String), }