pub trait FdlArgsTrait: Sized {
// Required methods
fn try_parse_from(args: &[String]) -> Result<Self, String>;
fn schema() -> Schema;
fn render_help() -> String;
// Provided method
fn parse() -> Self { ... }
}Expand description
Trait implemented by #[derive(FdlArgs)]. Carries the metadata needed
to parse argv into a concrete type and to emit the --fdl-schema JSON.
The name is FdlArgsTrait to avoid colliding with the re-exported
derive macro FdlArgs (which lives in the derive-macro namespace).
Users never refer to this trait directly — the derive implements it.
Required Methods§
Sourcefn try_parse_from(args: &[String]) -> Result<Self, String>
fn try_parse_from(args: &[String]) -> Result<Self, String>
Parse from an explicit argv slice. First element is the program name (ignored), following elements are flags/values/positionals.
Sourcefn render_help() -> String
fn render_help() -> String
Render --help to a string.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.