Struct genpdf::elements::TableLayoutRow [−][src]
pub struct TableLayoutRow<'a> { /* fields omitted */ }
Expand description
A row of a table layout.
This is a helper struct for populating a TableLayout
. After you have added all elements
to the row using push_element
or element
, you can append the row to the table
layout by calling push
.
Examples
With setters:
use genpdf::elements; let mut table = elements::TableLayout::new(vec![1, 1]); let mut row = table.row(); row.push_element(elements::Paragraph::new("Cell 1")); row.push_element(elements::Paragraph::new("Cell 2")); row.push().expect("Invalid table row");
Chained:
use genpdf::elements; let table = elements::TableLayout::new(vec![1, 1]) .row() .element(elements::Paragraph::new("Cell 1")) .element(elements::Paragraph::new("Cell 2")) .push() .expect("Invalid table row");
Implementations
Adds the given element to this row.
Adds the given element to this row and returns the row.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for TableLayoutRow<'a>
impl<'a> !Send for TableLayoutRow<'a>
impl<'a> !Sync for TableLayoutRow<'a>
impl<'a> Unpin for TableLayoutRow<'a>
impl<'a> !UnwindSafe for TableLayoutRow<'a>