Struct somedoc::model::block::Table[][src]

pub struct Table { /* fields omitted */ }

A typical, simple, table of rows and columns.

Implementations

impl Table[src]

pub fn new(columns: &[Column]) -> Self[src]

Construct a new Table from an array of Column values. These column values describe the shape of the table to be constructed.

pub fn has_columns(&self) -> bool[src]

Return true if this table has columns (although it's not really a table without them), else false.

pub fn columns(&self) -> &Vec<Column>[src]

Return the current array of columns in the table.

pub fn add_column(&mut self, column: Column)[src]

Add a new column to the table, this is appended to the current array.

pub fn add_columns(&mut self, columns: &[Column])[src]

Add an array of columns to the table, these are appended to the current array.

pub fn has_rows(&self) -> bool[src]

Returns true if this table has data rows, else false.

pub fn rows(&self) -> &Vec<Row>[src]

Returns an array of data rows.

pub fn add_row(&mut self, row: Row)[src]

Add a new data row to the column, this is appended to the current array.

pub fn add_rows(&mut self, rows: &[Row])[src]

Add an array of new data rows to the column, these are appended to the current array.

Trait Implementations

impl Clone for Table[src]

impl Debug for Table[src]

impl Default for Table[src]

impl<'de> Deserialize<'de> for Table[src]

impl HasCaption for Table[src]

impl HasLabel for Table[src]

impl Into<BlockContent> for Table[src]

impl Serialize for Table[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.