[][src]Struct tablers::Table

pub struct Table {
    pub topic: Option<String>,
    pub header: Option<Row>,
    pub rows: Vec<Row>,
}

Fields

topic: Option<String>header: Option<Row>rows: Vec<Row>

Implementations

impl Table[src]

pub fn push_row(&mut self, row: impl Into<Row>)[src]

pub fn push_table(&mut self, other: Table)[src]

Pushes an entire table to this table. This will panic if the tables are not of the same size.

The topic of the pused table will be discarded. The header row, (if any), will be added to this table with Style header.

pub fn set_topic(&mut self, s: impl Into<String>)[src]

pub fn set_header(&mut self, header: impl IntoIterator<Item = Cell>)[src]

pub fn to_pdf(&self, title: impl AsRef<str>) -> Result<Vec<u8>, Error>[src]

pub fn to_csv(&self) -> Result<Vec<u8>, Error>[src]

Trait Implementations

impl Debug for Table[src]

impl Default for Table[src]

impl FromIterator<Row> for Table[src]

Auto Trait Implementations

impl RefUnwindSafe for Table

impl Send for Table

impl Sync for Table

impl Unpin for Table

impl UnwindSafe for Table

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> From<T> for T[src]

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

impl<T> SetParameter for T

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.