pub trait LanguageSet<'config> {
type LanguageMetas: 'static;
// 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(
language: &str,
config: &'config Config,
args: &'config ArgMatches,
metas: &Self::LanguageMetas,
data: HashMap<Option<CrateName>, ParsedData>,
destination: &OutputLocation<'_>,
) -> Result<()>;
}Required Associated Types§
type LanguageMetas: 'static
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".