[−][src]Trait genco::prelude::Lang
Trait to implement for language specialization.
Associated Types
type Config
Configuration associated with building a formatting element.
type Format: Default
State being used during formatting.
type Import: ?Sized
The type used when resolving imports.
Provided methods
fn default_indentation() -> usize
The default indentation for the current language.
fn quote_string(out: &mut Formatter, input: &str) -> Result
Performing quoting according to convention set by custom element.
fn format_file(
tokens: &Tokens<Self>,
out: &mut Formatter,
config: &Self::Config
) -> Result
tokens: &Tokens<Self>,
out: &mut Formatter,
config: &Self::Config
) -> Result
Write a file according to convention by custom element.
Implementations on Foreign Types
impl Lang for ()
[src]
Dummy implementation for unit.
Implementors
impl Lang for Csharp
[src]
type Config = Config
type Format = Format
type Import = dyn TypeTrait
fn quote_string(out: &mut Formatter, input: &str) -> Result
[src]
fn format_file(
tokens: &Tokens,
out: &mut Formatter,
config: &Self::Config
) -> Result
[src]
tokens: &Tokens,
out: &mut Formatter,
config: &Self::Config
) -> Result
impl Lang for Dart
[src]
type Config = Config
type Format = Format
type Import = Type
fn quote_string(out: &mut Formatter, input: &str) -> Result
[src]
fn format_file(
tokens: &Tokens,
out: &mut Formatter,
config: &Self::Config
) -> Result
[src]
tokens: &Tokens,
out: &mut Formatter,
config: &Self::Config
) -> Result
impl Lang for Go
[src]
type Config = Config
type Format = Format
type Import = dyn TypeTrait
fn quote_string(out: &mut Formatter, input: &str) -> Result
[src]
fn format_file(
tokens: &Tokens,
out: &mut Formatter,
config: &Self::Config
) -> Result
[src]
tokens: &Tokens,
out: &mut Formatter,
config: &Self::Config
) -> Result
impl Lang for Java
[src]
type Config = Config
type Format = Format
type Import = dyn TypeTrait
fn quote_string(out: &mut Formatter, input: &str) -> Result
[src]
fn format_file(
tokens: &Tokens,
out: &mut Formatter,
config: &Self::Config
) -> Result
[src]
tokens: &Tokens,
out: &mut Formatter,
config: &Self::Config
) -> Result
impl Lang for JavaScript
[src]
type Config = Config
type Format = Format
type Import = dyn TypeTrait
fn quote_string(out: &mut Formatter, input: &str) -> Result
[src]
fn format_file(
tokens: &Tokens,
out: &mut Formatter,
config: &Self::Config
) -> Result
[src]
tokens: &Tokens,
out: &mut Formatter,
config: &Self::Config
) -> Result
impl Lang for Python
[src]
type Config = Config
type Format = Format
type Import = Type
fn quote_string(out: &mut Formatter, input: &str) -> Result
[src]
fn format_file(
tokens: &Tokens,
out: &mut Formatter,
config: &Self::Config
) -> Result
[src]
tokens: &Tokens,
out: &mut Formatter,
config: &Self::Config
) -> Result
impl Lang for Rust
[src]
type Config = Config
type Format = Format
type Import = Type
fn quote_string(out: &mut Formatter, input: &str) -> Result
[src]
fn format_file(
tokens: &Tokens,
out: &mut Formatter,
config: &Self::Config
) -> Result
[src]
tokens: &Tokens,
out: &mut Formatter,
config: &Self::Config
) -> Result