[−][src]Trait genco::lang::LangItem
A type-erased holder for language-specific items.
Carries formatting and coercion functions like as_import to allow language specific processing to work.
Required methods
fn format(
&self,
out: &mut Formatter,
config: &L::Config,
format: &L::Format
) -> Result
&self,
out: &mut Formatter,
config: &L::Config,
format: &L::Format
) -> Result
Format the language item appropriately.
fn __lang_item_as_any(&self) -> &dyn Any
LangItem convert to Any. Automatically implemented by macro.
fn __lang_item_clone(&self) -> Box<dyn LangItem<L>>
LangItem clone. Automatically implemented by macro.
fn __lang_item_eq(&self, other: &dyn LangItem<L>) -> bool
LangItem equality. Automatically implemented by macro.
Provided methods
fn as_import(&self) -> Option<&L::Import>
Coerce into an imported type.
This is used for import resolution for custom language items.
Implementors
impl LangItem<Csharp> for genco::lang::csharp::Import
[src]
fn format(
&self,
out: &mut Formatter,
config: &Config,
format: &Format
) -> Result
[src]
&self,
out: &mut Formatter,
config: &Config,
format: &Format
) -> Result
fn as_import(&self) -> Option<&Self>
[src]
fn __lang_item_as_any(&self) -> &dyn Any
[src]
fn __lang_item_clone(&self) -> Box<dyn LangItem<Csharp>>
[src]
fn __lang_item_eq(&self, other: &dyn LangItem<Csharp>) -> bool
[src]
impl LangItem<Dart> for genco::lang::dart::Import
[src]
fn format(&self, out: &mut Formatter, _: &Config, _: &Format) -> Result
[src]
fn as_import(&self) -> Option<&Self>
[src]
fn __lang_item_as_any(&self) -> &dyn Any
[src]
fn __lang_item_clone(&self) -> Box<dyn LangItem<Dart>>
[src]
fn __lang_item_eq(&self, other: &dyn LangItem<Dart>) -> bool
[src]
impl LangItem<Go> for genco::lang::go::Import
[src]
fn format(&self, out: &mut Formatter, _: &Config, _: &Format) -> Result
[src]
fn as_import(&self) -> Option<&Self>
[src]
fn __lang_item_as_any(&self) -> &dyn Any
[src]
fn __lang_item_clone(&self) -> Box<dyn LangItem<Go>>
[src]
fn __lang_item_eq(&self, other: &dyn LangItem<Go>) -> bool
[src]
impl LangItem<Java> for genco::lang::java::Import
[src]
fn format(
&self,
out: &mut Formatter,
config: &Config,
format: &Format
) -> Result
[src]
&self,
out: &mut Formatter,
config: &Config,
format: &Format
) -> Result