pub trait Param {
type Item;
type Error: Debug + Display;
// Required methods
fn update_options(&self, opts: &mut Options, notes: Notes);
fn get(&self, matches: &Matches) -> Result<Self::Item, Self::Error>;
fn name(&self) -> String;
// Provided methods
fn parse<C: IntoIterator>(
&self,
args: C,
which_notes_to_document: WhichNotes,
) -> (Result<Self::Item, TopLevelError<Self::Error>>, Usage)
where C::Item: AsRef<OsStr> { ... }
fn parse_env(
&self,
which_notes_to_document: WhichNotes,
program_name: ProgramName,
) -> (Result<Self::Item, TopLevelError<Self::Error>>, UsageWithProgramName) { ... }
fn parse_env_default(
&self,
) -> (Result<Self::Item, TopLevelError<Self::Error>>, UsageWithProgramName) { ... }
}Required Associated Types§
Required Methods§
fn update_options(&self, opts: &mut Options, notes: Notes)
fn get(&self, matches: &Matches) -> Result<Self::Item, Self::Error>
fn name(&self) -> String
Provided Methods§
fn parse<C: IntoIterator>( &self, args: C, which_notes_to_document: WhichNotes, ) -> (Result<Self::Item, TopLevelError<Self::Error>>, Usage)
fn parse_env( &self, which_notes_to_document: WhichNotes, program_name: ProgramName, ) -> (Result<Self::Item, TopLevelError<Self::Error>>, UsageWithProgramName)
fn parse_env_default( &self, ) -> (Result<Self::Item, TopLevelError<Self::Error>>, UsageWithProgramName)
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.