Trait genco::Custom
[−]
[src]
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.
Provided Methods
fn format(
&self,
_out: &mut Formatter,
_extra: &mut Self::Extra,
_level: usize
) -> Result
&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
tokens: Tokens<'el, Self>,
out: &mut Formatter,
extra: &mut Self::Extra,
level: usize
) -> Result
Write a file according to convention by custom element.
Implementations on Foreign Types
impl Custom for ()
[src]
Dummy implementation for unit.