pub enum RenderNode {
Page {
width: f64,
height: f64,
children: Vec<RenderNode>,
},
Text {
x: f64,
y: f64,
content: String,
font: String,
size: f64,
},
Rect {
x: f64,
y: f64,
width: f64,
height: f64,
fill: Option<[u8; 3]>,
stroke: Option<[u8; 3]>,
},
Image {
x: f64,
y: f64,
width: f64,
height: f64,
data_len: usize,
},
Widget {
x: f64,
y: f64,
width: f64,
height: f64,
field_name: String,
value: String,
},
Group {
children: Vec<RenderNode>,
},
}Expand description
A node in the intermediate render representation.
RenderTree is cheap to build and intended for debug/inspection only.
It mirrors the structure of the layout DOM but strips out raw PDF operator
details in favour of human-readable fields.
Variants§
Page
A page container with known dimensions.
Text
A single line of text positioned in PDF coordinate space.
Rect
A filled/stroked rectangle.
Fields
Image
An embedded image placeholder (actual bytes excluded for brevity).
Widget
An interactive form widget.
Fields
Group
A group of child nodes (e.g. a subform container).
Fields
§
children: Vec<RenderNode>Child render nodes.
Trait Implementations§
Source§impl Clone for RenderNode
impl Clone for RenderNode
Source§fn clone(&self) -> RenderNode
fn clone(&self) -> RenderNode
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 RenderNode
impl RefUnwindSafe for RenderNode
impl Send for RenderNode
impl Sync for RenderNode
impl Unpin for RenderNode
impl UnsafeUnpin for RenderNode
impl UnwindSafe for RenderNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more