Skip to main content

OutputFormat

Trait OutputFormat 

Source
pub trait OutputFormat {
    // Required method
    fn render(&self, results: &[SearchResult], verbose: u8) -> String;
}
Expand description

Trait for rendering search results in different output formats.

Required Methods§

Source

fn render(&self, results: &[SearchResult], verbose: u8) -> String

Render search results to a string.

verbose controls detail level: 0 = minimal (title + score) 1 = normal (title + summary + score) 2 = full (title + summary + text + line numbers)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§