pub trait LanguageSet {
type LanguageMetas;
// Required methods
fn compute_language_metas() -> Result<Self::LanguageMetas>;
fn add_lang_argument(command: Command) -> Command;
fn add_language_specific_arguments(
command: Command,
metas: &Self::LanguageMetas,
) -> Command;
fn execute_typeshare_for_language<'c, 'a: 'c>(
language: &str,
config: &'c Config,
args: &'c ArgMatches,
metas: &'a Self::LanguageMetas,
data: HashMap<Option<CrateName>, ParsedData>,
destination: &OutputLocation<'_>,
) -> Result<()>;
}Required Associated Types§
type LanguageMetas
Required Methods§
Sourcefn compute_language_metas() -> Result<Self::LanguageMetas>
fn compute_language_metas() -> Result<Self::LanguageMetas>
Each language has a set of configuration metadata, describing all of its configuration parameters. This metadata is used to populate the clap command with language specific parameters for each language, and to load a fully configured language. It is computed based on the serde serialization of a config.
Sourcefn add_lang_argument(command: Command) -> Command
fn add_lang_argument(command: Command) -> Command
Add the --language argument to the command, such that all of the
languages in this set are possible values for that argument
Sourcefn add_language_specific_arguments(
command: Command,
metas: &Self::LanguageMetas,
) -> Command
fn add_language_specific_arguments( command: Command, metas: &Self::LanguageMetas, ) -> Command
Add all of the language-specific arguments to the clap command.
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.