Skip to main content

LineProvider

Trait LineProvider 

Source
pub trait LineProvider:
    Send
    + Sync
    + 'static {
    // Required method
    fn get(&self, line_id: &str) -> Option<String>;
}
Expand description

Supplies localised (or otherwise substituted) text for a line.

When a line carries a #line:<id> tag, the runner queries the provider with that id. If the provider returns Some(text), that replaces the original line text in the event. If it returns None, the original source text is used as-is.

Required Methods§

Source

fn get(&self, line_id: &str) -> Option<String>

Returns localised text for line_id, or None to use the source text.

Implementors§