Trait LanguageSet

Source
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§

Required Methods§

Source

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.

Source

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

Source

fn add_language_specific_arguments( command: Command, metas: &Self::LanguageMetas, ) -> Command

Add all of the language-specific arguments to the clap command.

Source

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<()>

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.

Implementations on Foreign Types§

Source§

impl<A> LanguageSet for (A,)
where for<'config> A: Language<'config>,

Source§

impl<A, B> LanguageSet for (A, B)
where for<'config> A: Language<'config>, for<'config> B: Language<'config>,

Source§

impl<A, B, C> LanguageSet for (A, B, C)
where for<'config> A: Language<'config>, for<'config> B: Language<'config>, for<'config> C: Language<'config>,

Source§

impl<A, B, C, D> LanguageSet for (A, B, C, D)
where for<'config> A: Language<'config>, for<'config> B: Language<'config>, for<'config> C: Language<'config>, for<'config> D: Language<'config>,

Source§

impl<A, B, C, D, E> LanguageSet for (A, B, C, D, E)
where for<'config> A: Language<'config>, for<'config> B: Language<'config>, for<'config> C: Language<'config>, for<'config> D: Language<'config>, for<'config> E: Language<'config>,

Source§

impl<A, B, C, D, E, F> LanguageSet for (A, B, C, D, E, F)
where for<'config> A: Language<'config>, for<'config> B: Language<'config>, for<'config> C: Language<'config>, for<'config> D: Language<'config>, for<'config> E: Language<'config>, for<'config> F: Language<'config>,

Source§

impl<A, B, C, D, E, F, G> LanguageSet for (A, B, C, D, E, F, G)
where for<'config> A: Language<'config>, for<'config> B: Language<'config>, for<'config> C: Language<'config>, for<'config> D: Language<'config>, for<'config> E: Language<'config>, for<'config> F: Language<'config>, for<'config> G: Language<'config>,

Source§

impl<A, B, C, D, E, F, G, H> LanguageSet for (A, B, C, D, E, F, G, H)
where for<'config> A: Language<'config>, for<'config> B: Language<'config>, for<'config> C: Language<'config>, for<'config> D: Language<'config>, for<'config> E: Language<'config>, for<'config> F: Language<'config>, for<'config> G: Language<'config>, for<'config> H: Language<'config>,

Source§

impl<A, B, C, D, E, F, G, H, I> LanguageSet for (A, B, C, D, E, F, G, H, I)
where for<'config> A: Language<'config>, for<'config> B: Language<'config>, for<'config> C: Language<'config>, for<'config> D: Language<'config>, for<'config> E: Language<'config>, for<'config> F: Language<'config>, for<'config> G: Language<'config>, for<'config> H: Language<'config>, for<'config> I: Language<'config>,

Source§

impl<A, B, C, D, E, F, G, H, I, J> LanguageSet for (A, B, C, D, E, F, G, H, I, J)
where for<'config> A: Language<'config>, for<'config> B: Language<'config>, for<'config> C: Language<'config>, for<'config> D: Language<'config>, for<'config> E: Language<'config>, for<'config> F: Language<'config>, for<'config> G: Language<'config>, for<'config> H: Language<'config>, for<'config> I: Language<'config>, for<'config> J: Language<'config>,

Source§

impl<A, B, C, D, E, F, G, H, I, J, K> LanguageSet for (A, B, C, D, E, F, G, H, I, J, K)
where for<'config> A: Language<'config>, for<'config> B: Language<'config>, for<'config> C: Language<'config>, for<'config> D: Language<'config>, for<'config> E: Language<'config>, for<'config> F: Language<'config>, for<'config> G: Language<'config>, for<'config> H: Language<'config>, for<'config> I: Language<'config>, for<'config> J: Language<'config>, for<'config> K: Language<'config>,

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> LanguageSet for (A, B, C, D, E, F, G, H, I, J, K, L)
where for<'config> A: Language<'config>, for<'config> B: Language<'config>, for<'config> C: Language<'config>, for<'config> D: Language<'config>, for<'config> E: Language<'config>, for<'config> F: Language<'config>, for<'config> G: Language<'config>, for<'config> H: Language<'config>, for<'config> I: Language<'config>, for<'config> J: Language<'config>, for<'config> K: Language<'config>, for<'config> L: Language<'config>,

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M> LanguageSet for (A, B, C, D, E, F, G, H, I, J, K, L, M)
where for<'config> A: Language<'config>, for<'config> B: Language<'config>, for<'config> C: Language<'config>, for<'config> D: Language<'config>, for<'config> E: Language<'config>, for<'config> F: Language<'config>, for<'config> G: Language<'config>, for<'config> H: Language<'config>, for<'config> I: Language<'config>, for<'config> J: Language<'config>, for<'config> K: Language<'config>, for<'config> L: Language<'config>, for<'config> M: Language<'config>,

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N> LanguageSet for (A, B, C, D, E, F, G, H, I, J, K, L, M, N)
where for<'config> A: Language<'config>, for<'config> B: Language<'config>, for<'config> C: Language<'config>, for<'config> D: Language<'config>, for<'config> E: Language<'config>, for<'config> F: Language<'config>, for<'config> G: Language<'config>, for<'config> H: Language<'config>, for<'config> I: Language<'config>, for<'config> J: Language<'config>, for<'config> K: Language<'config>, for<'config> L: Language<'config>, for<'config> M: Language<'config>, for<'config> N: Language<'config>,

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> LanguageSet for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O)
where for<'config> A: Language<'config>, for<'config> B: Language<'config>, for<'config> C: Language<'config>, for<'config> D: Language<'config>, for<'config> E: Language<'config>, for<'config> F: Language<'config>, for<'config> G: Language<'config>, for<'config> H: Language<'config>, for<'config> I: Language<'config>, for<'config> J: Language<'config>, for<'config> K: Language<'config>, for<'config> L: Language<'config>, for<'config> M: Language<'config>, for<'config> N: Language<'config>, for<'config> O: Language<'config>,

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> LanguageSet for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P)
where for<'config> A: Language<'config>, for<'config> B: Language<'config>, for<'config> C: Language<'config>, for<'config> D: Language<'config>, for<'config> E: Language<'config>, for<'config> F: Language<'config>, for<'config> G: Language<'config>, for<'config> H: Language<'config>, for<'config> I: Language<'config>, for<'config> J: Language<'config>, for<'config> K: Language<'config>, for<'config> L: Language<'config>, for<'config> M: Language<'config>, for<'config> N: Language<'config>, for<'config> O: Language<'config>, for<'config> P: Language<'config>,

Implementors§