AnalysisStore

Trait AnalysisStore 

Source
pub trait AnalysisStore {
Show 14 methods // Required methods fn add_lines(&self, lines: &[LogLine]); fn add_search_lines(&self, lines: &[LogLine]); fn add_search_query(&self, query: &str); fn get_search_query(&self) -> Option<String>; fn reset_log(&self); fn reset_search(&self); fn fetch_log(&self) -> RwLockReadGuard<'_, RawRwLock, Vec<LogLine>>; fn fetch_search(&self) -> RwLockReadGuard<'_, RawRwLock, Vec<LogLine>>; fn get_log_lines(&self, from: usize, to: usize) -> Vec<LogLine>; fn get_search_lines(&self, from: usize, to: usize) -> Vec<LogLine>; fn get_log_lines_containing( &self, index: usize, elements: usize, ) -> (Vec<LogLine>, usize, usize); fn get_search_lines_containing( &self, index: usize, elements: usize, ) -> (Vec<LogLine>, usize, usize); fn get_total_filtered_lines(&self) -> usize; fn get_total_searched_lines(&self) -> usize;
}
Expand description

Store for managing processed logs.

Stores both the combined filtered log and the search log

Required Methods§

Source

fn add_lines(&self, lines: &[LogLine])

Add a list of processed lines

Source

fn add_search_lines(&self, lines: &[LogLine])

Add a list of searched lines

Source

fn add_search_query(&self, query: &str)

Change the search query

Source

fn get_search_query(&self) -> Option<String>

Get the current search query

Source

fn reset_log(&self)

Clear the processed log

Clear the searched log

Source

fn fetch_log(&self) -> RwLockReadGuard<'_, RawRwLock, Vec<LogLine>>

Get a RwLock to the current processed log to avoid copying

Get a RwLock to the current searched log to avoid copying

Source

fn get_log_lines(&self, from: usize, to: usize) -> Vec<LogLine>

Get a copy of a window of lines. Is safe to query out of bounds

Source

fn get_search_lines(&self, from: usize, to: usize) -> Vec<LogLine>

Get a copy of a window of search lines. Is safe to query out of bounds

Source

fn get_log_lines_containing( &self, index: usize, elements: usize, ) -> (Vec<LogLine>, usize, usize)

Get a window of elements number of lines centered around the target line

Returns (list of lines, offset from start, index of target)

Source

fn get_search_lines_containing( &self, index: usize, elements: usize, ) -> (Vec<LogLine>, usize, usize)

Get a window of elements number of lines centered around the target line

Returns (list of lines, offset from start, index of target)

Source

fn get_total_filtered_lines(&self) -> usize

Count the total number of lines

Source

fn get_total_searched_lines(&self) -> usize

Count the total number of search lines

Implementors§