pub struct TableLayoutRow<'a> { /* private fields */ }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§
Source§impl<'a> TableLayoutRow<'a>
impl<'a> TableLayoutRow<'a>
Auto Trait Implementations§
impl<'a> Freeze for TableLayoutRow<'a>
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>
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