Table

Trait Table 

Source
pub trait Table:
    Debug
    + Send
    + Sync {
    // Required methods
    fn get_cell(
        &self,
        row: usize,
        column: &str,
    ) -> Result<LiteralValue, ExcelError>;
    fn get_column(&self, column: &str) -> Result<Box<dyn Range>, ExcelError>;
    fn clone_box(&self) -> Box<dyn Table>;

    // Provided methods
    fn columns(&self) -> Vec<String> { ... }
    fn data_height(&self) -> usize { ... }
    fn has_headers(&self) -> bool { ... }
    fn has_totals(&self) -> bool { ... }
    fn headers_row(&self) -> Option<Box<dyn Range>> { ... }
    fn totals_row(&self) -> Option<Box<dyn Range>> { ... }
    fn data_body(&self) -> Option<Box<dyn Range>> { ... }
}

Required Methods§

Source

fn get_cell(&self, row: usize, column: &str) -> Result<LiteralValue, ExcelError>

Source

fn get_column(&self, column: &str) -> Result<Box<dyn Range>, ExcelError>

Source

fn clone_box(&self) -> Box<dyn Table>

Provided Methods§

Source

fn columns(&self) -> Vec<String>

Ordered list of column names

Source

fn data_height(&self) -> usize

Number of data rows (excluding headers/totals)

Source

fn has_headers(&self) -> bool

Whether the table has a header row

Source

fn has_totals(&self) -> bool

Whether the table has a totals row

Source

fn headers_row(&self) -> Option<Box<dyn Range>>

Headers row as a 1xW range

Source

fn totals_row(&self) -> Option<Box<dyn Range>>

Totals row as a 1xW range, if present

Source

fn data_body(&self) -> Option<Box<dyn Range>>

Entire data body as HxW range

Trait Implementations§

Source§

impl Table for Box<dyn Table>

Source§

fn get_cell(&self, r: usize, c: &str) -> Result<LiteralValue, ExcelError>

Source§

fn get_column(&self, c: &str) -> Result<Box<dyn Range>, ExcelError>

Source§

fn columns(&self) -> Vec<String>

Ordered list of column names
Source§

fn data_height(&self) -> usize

Number of data rows (excluding headers/totals)
Source§

fn has_headers(&self) -> bool

Whether the table has a header row
Source§

fn has_totals(&self) -> bool

Whether the table has a totals row
Source§

fn headers_row(&self) -> Option<Box<dyn Range>>

Headers row as a 1xW range
Source§

fn totals_row(&self) -> Option<Box<dyn Range>>

Totals row as a 1xW range, if present
Source§

fn data_body(&self) -> Option<Box<dyn Range>>

Entire data body as HxW range
Source§

fn clone_box(&self) -> Box<dyn Table>

Implementations on Foreign Types§

Source§

impl Table for Box<dyn Table>

Implementors§