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§
Source§impl Table
impl Table
pub fn push_row(&mut self, row: impl Into<Row>)
Sourcepub fn push_table(&mut self, other: Table)
pub fn push_table(&mut self, other: Table)
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>)
pub fn set_header(&mut self, header: impl IntoIterator<Item = Cell>)
pub fn to_pdf(&self, title: impl AsRef<str>) -> Result<Vec<u8>, Error>
pub fn to_csv(&self) -> Result<Vec<u8>, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnwindSafe for Table
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more