pub struct LayoutElement {Show 14 fields
pub x: f64,
pub y: f64,
pub width: f64,
pub height: f64,
pub draw: DrawCommand,
pub children: Vec<LayoutElement>,
pub node_type: Option<String>,
pub resolved_style: Option<ResolvedStyle>,
pub source_location: Option<SourceLocation>,
pub href: Option<String>,
pub bookmark: Option<String>,
pub alt: Option<String>,
pub is_header_row: bool,
pub overflow: Overflow,
}Expand description
A positioned element on a page.
Fields§
§x: f64Absolute position on the page (top-left corner).
y: f64§width: f64Dimensions including padding and border, excluding margin.
height: f64§draw: DrawCommandThe visual properties to draw.
children: Vec<LayoutElement>Child elements (positioned relative to page, not parent).
node_type: Option<String>Logical node type for dev tools (e.g. “View”, “Text”, “Image”).
resolved_style: Option<ResolvedStyle>Resolved style snapshot for inspector panel.
source_location: Option<SourceLocation>Source code location for click-to-source in the dev inspector.
href: Option<String>Optional hyperlink URL for link annotations.
bookmark: Option<String>Optional bookmark title for PDF outline entries.
alt: Option<String>Optional alt text for images and SVGs (accessibility).
is_header_row: boolWhether this is a table header row (for tagged PDF: TH vs TD).
overflow: OverflowOverflow behavior (Visible or Hidden). When Hidden, PDF clips children.
Trait Implementations§
Source§impl Clone for LayoutElement
impl Clone for LayoutElement
Source§fn clone(&self) -> LayoutElement
fn clone(&self) -> LayoutElement
Returns a duplicate of the value. Read more
1.0.0 · 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 LayoutElement
impl RefUnwindSafe for LayoutElement
impl Send for LayoutElement
impl Sync for LayoutElement
impl Unpin for LayoutElement
impl UnsafeUnpin for LayoutElement
impl UnwindSafe for LayoutElement
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