pub trait Langwhere
    Self: 'static + Sized + Copy + Eq + Ord + Hash + Debug,
{ type Config; type Format: Default; type Item: LangItem<Self>; fn default_indentation() -> Indentation { ... } fn open_quote(
        out: &mut Formatter<'_>,
        _config: &Self::Config,
        _format: &Self::Format,
        _has_eval: bool
    ) -> Result { ... } fn close_quote(
        out: &mut Formatter<'_>,
        _config: &Self::Config,
        _format: &Self::Format,
        _has_eval: bool
    ) -> Result { ... } fn string_eval_literal(
        out: &mut Formatter<'_>,
        config: &Self::Config,
        format: &Self::Format,
        literal: &str
    ) -> Result { ... } fn start_string_eval(
        _out: &mut Formatter<'_>,
        _config: &Self::Config,
        _format: &Self::Format
    ) -> Result { ... } fn end_string_eval(
        _out: &mut Formatter<'_>,
        _config: &Self::Config,
        _format: &Self::Format
    ) -> Result { ... } fn write_quoted(out: &mut Formatter<'_>, input: &str) -> Result { ... } fn format_file(
        tokens: &Tokens<Self>,
        out: &mut Formatter<'_>,
        config: &Self::Config
    ) -> Result { ... } }
Expand description

Trait to implement for language specialization.

The various language implementations can be found in the lang module.

Required Associated Types

Configuration associated with building a formatting element.

State being used during formatting.

The type used when resolving imports.

Provided Methods

Provide the default indentation.

Start a string quote.

End a string quote.

A simple, single-literal string evaluation.

Start a string-interpolated eval.

End a string interpolated eval.

Performing string quoting according to language convention.

Write a file according to the specified language convention.

Implementations on Foreign Types

Dummy implementation for a language.

Implementors