pub struct ArgsSpec {
pub options: Vec<OptionDecl>,
pub positionals: Vec<PositionalDecl>,
pub lenient_unknowns: bool,
}Expand description
Declarative spec of what flags and positionals a CLI accepts. Built by
the #[derive(FdlArgs)] output at runtime, consumed by parse.
Fields§
§options: Vec<OptionDecl>§positionals: Vec<PositionalDecl>§lenient_unknowns: boolWhen true, unknown long/short flags are silently skipped (the token is consumed, no error is raised), and the required- positional check is disabled. Used by fdl’s non-strict tail validation: the binary re-parses the argv itself, so fdl’s job is to enforce declared contracts (choices on known flags, positional choices when unambiguous) without blocking pass-through flags the author chose to allow.
Defaults to false so derive binaries stay strict by default.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ArgsSpec
impl RefUnwindSafe for ArgsSpec
impl Send for ArgsSpec
impl Sync for ArgsSpec
impl Unpin for ArgsSpec
impl UnsafeUnpin for ArgsSpec
impl UnwindSafe for ArgsSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more