[][src]Trait genco::Custom

pub trait Custom where
    Self: Sized
{ type Config: Config; fn format(
        &self,
        _out: &mut Formatter,
        _config: &mut Self::Config,
        _level: usize
    ) -> Result { ... }
fn quote_string(out: &mut Formatter, input: &str) -> Result { ... }
fn write_file<'el>(
        tokens: Tokens<'el, Self>,
        out: &mut Formatter,
        config: &mut Self::Config,
        level: usize
    ) -> Result { ... } }

Trait that must be implemented by custom elements.

Associated Types

type Config: Config

Configuration associated with building a formatting element.

Loading content...

Provided methods

fn format(
    &self,
    _out: &mut Formatter,
    _config: &mut Self::Config,
    _level: usize
) -> Result

Format the custom element.

fn quote_string(out: &mut Formatter, input: &str) -> Result

Performing quoting according to convention set by custom element.

fn write_file<'el>(
    tokens: Tokens<'el, Self>,
    out: &mut Formatter,
    config: &mut Self::Config,
    level: usize
) -> Result

Write a file according to convention by custom element.

Loading content...

Implementations on Foreign Types

impl Custom for ()[src]

Dummy implementation for unit.

type Config = ()

Loading content...

Implementors

impl<'el> Custom for Csharp<'el>[src]

type Config = Config<'el>

impl<'el> Custom for Dart<'el>[src]

type Config = Config

impl<'el> Custom for Go<'el>[src]

type Config = Config

impl<'el> Custom for Java<'el>[src]

type Config = Config<'el>

impl<'el> Custom for Swift<'el>[src]

type Config = ()

impl<'el> Custom for JavaScript<'el>[src]

type Config = ()

impl<'el> Custom for Python<'el>[src]

type Config = ()

impl<'el> Custom for Rust<'el>[src]

type Config = Config

Loading content...