genco::lang

Trait LangItem

Source
pub trait LangItem<L>
where L: Lang, Self: 'static + Clone + Eq + Ord + Hash + Debug,
{ // Required method fn format( &self, fmt: &mut Formatter<'_>, config: &L::Config, format: &L::Format, ) -> Result; }
Expand description

A type-erased holder for language-specific items.

Carries formatting and coercion functions like LangItem to allow language specific processing to work.

Required Methods§

Source

fn format( &self, fmt: &mut Formatter<'_>, config: &L::Config, format: &L::Format, ) -> Result

Format the language item appropriately.

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<L> LangItem<L> for ()
where L: Lang,

Source§

fn format(&self, _: &mut Formatter<'_>, _: &L::Config, _: &L::Format) -> Result

Implementors§

Source§

impl LangItem<C> for genco::lang::c::Any

Source§

impl LangItem<C> for genco::lang::c::Import

Source§

impl LangItem<Csharp> for genco::lang::csharp::Any

Source§

impl LangItem<Csharp> for genco::lang::csharp::Import

Source§

impl LangItem<Dart> for genco::lang::dart::Any

Source§

impl LangItem<Dart> for genco::lang::dart::Import

Source§

impl LangItem<Go> for genco::lang::go::Any

Source§

impl LangItem<Go> for genco::lang::go::Import

Source§

impl LangItem<Java> for genco::lang::java::Any

Source§

impl LangItem<Java> for genco::lang::java::Import

Source§

impl LangItem<JavaScript> for genco::lang::js::Any

Source§

impl LangItem<JavaScript> for genco::lang::js::Import

Source§

impl LangItem<Nix> for genco::lang::nix::Any

Source§

impl LangItem<Nix> for genco::lang::nix::Import

Source§

impl LangItem<Python> for genco::lang::python::Any

Source§

impl LangItem<Python> for genco::lang::python::Import

Source§

impl LangItem<Python> for ImportModule

Source§

impl LangItem<Rust> for genco::lang::rust::Any

Source§

impl LangItem<Rust> for genco::lang::rust::Import

Source§

impl LangItem<Swift> for genco::lang::swift::Any

Source§

impl LangItem<Swift> for genco::lang::swift::Import