[][src]Trait genco::Custom

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

Trait that must be implemented by custom elements.

Associated Types

type Extra

Extra data associated with building a formatting element.

Loading content...

Provided methods

fn format(
    &self,
    _out: &mut Formatter,
    _extra: &mut Self::Extra,
    _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,
    extra: &mut Self::Extra,
    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 Extra = ()

Loading content...

Implementors

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

type Extra = Extra<'el>

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

type Extra = Extra

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

type Extra = Extra

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

type Extra = Extra<'el>

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

type Extra = ()

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

type Extra = ()

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

type Extra = ()

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

type Extra = ()

Loading content...