Trait jj_cli::formatter::Formatter

source ·
pub trait Formatter: Write {
    // Required methods
    fn raw(&mut self) -> &mut dyn Write;
    fn push_label(&mut self, label: &str) -> Result<()>;
    fn pop_label(&mut self) -> Result<()>;
}

Required Methods§

source

fn raw(&mut self) -> &mut dyn Write

Returns the backing Write. This is useful for writing data that is already formatted, such as in the graphical log.

source

fn push_label(&mut self, label: &str) -> Result<()>

source

fn pop_label(&mut self) -> Result<()>

Implementations§

source§

impl dyn Formatter + '_

source

pub fn labeled<S: AsRef<str>>( &mut self, label: S ) -> LabeledWriter<&mut Self, S>

source

pub fn with_label( &mut self, label: &str, write_inner: impl FnOnce(&mut dyn Formatter) -> Result<()> ) -> Result<()>

Trait Implementations§

source§

impl<'a> AsMut<dyn Formatter + 'a> for TemplateFormatter<'a>

source§

fn as_mut(&mut self) -> &mut (dyn Formatter + 'a)

Converts this type into a mutable reference of the (usually inferred) input type.

Implementors§