pub struct Table {
pub columns: Vec<TableColumn>,
pub header: Option<Vec<Element>>,
pub rows: Vec<Vec<Element>>,
pub striped: Option<Color>,
pub cell_padding: f32,
pub row_offset: usize,
pub common: Common,
}Fields§
§columns: Vec<TableColumn>§header: Option<Vec<Element>>§rows: Vec<Vec<Element>>§striped: Option<Color>Alternating row background (“Zebra-Streifen”), see
02-elementcatalog-and-features.md. Applies to data rows only (a
striped header would be indistinguishable from a striped data row).
cell_padding: f32Inner spacing on every side of each cell’s content, same default (4pt) header and data rows.
row_offset: usizeAbsolute index of rows[0] within the original, unsplit table —
0 unless this Table is itself the remainder produced by a
previous page’s LayoutResult::Split. Not part of the public
builder surface; exists purely so .striped() keeps alternating
correctly across a page break instead of resetting per page.
common: CommonImplementations§
Source§impl Table
impl Table
pub fn new() -> Self
pub fn columns(self, columns: impl IntoIterator<Item = TableColumn>) -> Self
pub fn header(self, cells: impl IntoIterator<Item = impl Into<Element>>) -> Self
pub fn rows( self, rows: impl IntoIterator<Item = impl IntoIterator<Item = impl Into<Element>>>, ) -> Self
pub fn striped(self, color: Color) -> Self
pub fn cell_padding(self, padding: f32) -> Self
pub fn width(self, width: f32) -> Self
pub fn height(self, height: f32) -> Self
pub fn flex(self, factor: f32) -> Self
pub fn keep_with_next(self) -> Self
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 UnsafeUnpin 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