[][src]Trait tectonic_status_base::StatusBackend

pub trait StatusBackend {
    pub fn report(
        &mut self,
        kind: MessageKind,
        args: Arguments<'_>,
        err: Option<&Error>
    );
pub fn dump_error_logs(&mut self, output: &[u8]); pub fn report_error(&mut self, err: &Error) { ... }
pub fn note_highlighted(
        &mut self,
        before: &str,
        highlighted: &str,
        after: &str
    ) { ... } }

A trait for accepting status messages.

Required methods

pub fn report(
    &mut self,
    kind: MessageKind,
    args: Arguments<'_>,
    err: Option<&Error>
)
[src]

Report a message to the status backend.

If err is not None, it represents an error that somehow caused the current message to be reported. It should be displayed in some appropriate fashion.

pub fn dump_error_logs(&mut self, output: &[u8])[src]

This is used to print TeX engine logs after it encountered errors. This should print the provided output, which may span many lines, with some clear delineation.

Loading content...

Provided methods

pub fn report_error(&mut self, err: &Error)[src]

Report an error to the status backend.

Unlike the basic report function, in this case there is no additional contextual information provided. The default implementation delegates to report() with a generic lead-in message of "an error occurred".

pub fn note_highlighted(&mut self, before: &str, highlighted: &str, after: &str)[src]

Issue a note-level status, idealy highlighting a particular phrase.

This is a bit of a hack. I like the UX when we issue notes in this style. It's a bit more high-level than intended for this trait, but we can provide a nice sensible default implementation, so whatever.

Loading content...

Implementors

impl StatusBackend for PlainStatusBackend[src]

impl StatusBackend for NoopStatusBackend[src]

Loading content...