pub struct JsonFormatter { /* private fields */ }Expand description
JSON output formatter
Implementations§
Source§impl JsonFormatter
impl JsonFormatter
pub fn new(options: OutputOptions) -> Self
Trait Implementations§
Source§impl Default for JsonFormatter
impl Default for JsonFormatter
Source§impl OutputFormatter for JsonFormatter
impl OutputFormatter for JsonFormatter
Source§fn format_result(&self, result: &GrepResult) -> Result<String>
fn format_result(&self, result: &GrepResult) -> Result<String>
Format a single grep result
Source§fn format_results(&self, results: &[GrepResult]) -> Result<String>
fn format_results(&self, results: &[GrepResult]) -> Result<String>
Format multiple grep results
Source§fn print_result(&self, result: &GrepResult) -> Result<()>
fn print_result(&self, result: &GrepResult) -> Result<()>
Print a result directly to stdout
Source§fn print_results(&self, results: &[GrepResult]) -> Result<()>
fn print_results(&self, results: &[GrepResult]) -> Result<()>
Print multiple results directly to stdout
Auto Trait Implementations§
impl Freeze for JsonFormatter
impl RefUnwindSafe for JsonFormatter
impl Send for JsonFormatter
impl Sync for JsonFormatter
impl Unpin for JsonFormatter
impl UnsafeUnpin for JsonFormatter
impl UnwindSafe for JsonFormatter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more