Trait EmitBackendTrait

Source
pub trait EmitBackendTrait {
    // Required method
    fn emit(
        &self,
        f: &mut Formatter<'_>,
        fragment: &str,
        style: &Style,
    ) -> EmitResult;

    // Provided method
    fn emitter(&self) -> EmitBackend<'_>
       where Self: Sized { ... }
}
Expand description

An implementation of EmitBackendTrait takes a piece of styled text and emits it into the supplied std::fmt::Formatter.

Required Methods§

Source

fn emit( &self, f: &mut Formatter<'_>, fragment: &str, style: &Style, ) -> EmitResult

Provided Methods§

Source

fn emitter(&self) -> EmitBackend<'_>
where Self: Sized,

Implementors§