Trait rustfmt_nightly::emitter::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§