#[non_exhaustive]pub struct TableElementData {
pub rows: Vec<Vec<String>>,
pub structure: Option<TableStructure>,
pub metadata: ElementMetadata,
}Expand description
Data specific to table elements.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.rows: Vec<Vec<String>>Row-major flat cell data. Each inner Vec is one row. When structure is
present this is its expanded (span-repeated) view; otherwise it is the
primary representation.
structure: Option<TableStructure>Rich structure (merged cells / header rows) when a hard signal revealed it.
metadata: ElementMetadataImplementations§
Source§impl TableElementData
impl TableElementData
Sourcepub fn new(rows: Vec<Vec<String>>, metadata: ElementMetadata) -> Self
pub fn new(rows: Vec<Vec<String>>, metadata: ElementMetadata) -> Self
Build a plain (non-rich) table from flat row-major cells. structure is
None; use from_structure when merged cells / header rows are known.
Sourcepub fn from_structure(
structure: TableStructure,
metadata: ElementMetadata,
) -> Self
pub fn from_structure( structure: TableStructure, metadata: ElementMetadata, ) -> Self
Build from rich structure, deriving the flat rows view by expanding each
spanning cell’s text across every covered (row, col).
Trait Implementations§
Source§impl Clone for TableElementData
impl Clone for TableElementData
Source§fn clone(&self) -> TableElementData
fn clone(&self) -> TableElementData
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TableElementData
impl RefUnwindSafe for TableElementData
impl Send for TableElementData
impl Sync for TableElementData
impl Unpin for TableElementData
impl UnsafeUnpin for TableElementData
impl UnwindSafe for TableElementData
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