rustfmt_nightly::emitter

Trait Emitter

Source
pub(crate) trait Emitter {
    // Required method
    fn emit_formatted_file(
        &mut self,
        output: &mut dyn Write,
        formatted_file: FormattedFile<'_>,
    ) -> Result<EmitterResult, Error>;

    // Provided methods
    fn emit_header(&self, _output: &mut dyn Write) -> Result<(), Error> { ... }
    fn emit_footer(&self, _output: &mut dyn Write) -> Result<(), Error> { ... }
}

Required Methods§

Source

fn emit_formatted_file( &mut self, output: &mut dyn Write, formatted_file: FormattedFile<'_>, ) -> Result<EmitterResult, Error>

Provided Methods§

Source

fn emit_header(&self, _output: &mut dyn Write) -> Result<(), Error>

Implementors§