Trait below_view::stats_view::ViewBridge[][src]

pub trait ViewBridge {
    type StateType: Default + StateCommon;
    fn get_view_name() -> &'static str;
fn get_title_vec(&self) -> Vec<String>
Notable traits for Vec<u8, A>
impl<A> Write for Vec<u8, A> where
    A: Allocator
;
fn get_rows(
        &mut self,
        state: &Self::StateType,
        offset: Option<usize>
    ) -> Vec<(StyledString, String)>
Notable traits for Vec<u8, A>
impl<A> Write for Vec<u8, A> where
    A: Allocator
; }
Expand description

ViewBridge defines how a ConcreteView will relate to StatsView

Associated Types

Required methods

Return the name of the view, this function will help StatsView to query view by name.

Return a vec of the view column names or title. This function will call the below_derive trait get_title_piped function and split by ‘|’. We cannot default implement this function since below_derive is not a trait.

The essential function that defines how a StatsView should fill the data. This function will iterate through the data, apply filter and sorting, return a Vec of (Stats String Line, Key) tuple.

Arguments
  • state: The concrete view state
  • offset: Indicates how many columns we should pass after the first column when generating a line.

Implementors