pub struct PrecisePageElement {
pub block_id: String,
pub x: String,
pub y: String,
pub width: String,
pub height: String,
pub continues: bool,
pub continuation: bool,
pub lines: Vec<LineInfo>,
pub transform: Option<Transform>,
}Expand description
A precisely positioned element on a page.
Fields§
§block_id: StringReference to content block ID.
x: StringHorizontal position from left edge.
y: StringVertical position from top edge.
width: StringElement width.
height: StringElement height.
continues: boolTrue if this element continues to the next page.
continuation: boolTrue if this element is continued from the previous page.
lines: Vec<LineInfo>Line-level precision for legal documents.
transform: Option<Transform>2D transform for rotation, scale, skew.
Implementations§
Source§impl PrecisePageElement
impl PrecisePageElement
Sourcepub fn new(
block_id: impl Into<String>,
x: impl Into<String>,
y: impl Into<String>,
width: impl Into<String>,
height: impl Into<String>,
) -> Self
pub fn new( block_id: impl Into<String>, x: impl Into<String>, y: impl Into<String>, width: impl Into<String>, height: impl Into<String>, ) -> Self
Create a new element with precise positioning.
Sourcepub fn with_transform(self, transform: Transform) -> Self
pub fn with_transform(self, transform: Transform) -> Self
Set the transform for this element.
Sourcepub fn continuation(self) -> Self
pub fn continuation(self) -> Self
Mark this element as a continuation from the previous page.
Sourcepub fn with_lines(self, lines: Vec<LineInfo>) -> Self
pub fn with_lines(self, lines: Vec<LineInfo>) -> Self
Add line-level precision information.
Trait Implementations§
Source§impl Clone for PrecisePageElement
impl Clone for PrecisePageElement
Source§fn clone(&self) -> PrecisePageElement
fn clone(&self) -> PrecisePageElement
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 moreSource§impl Debug for PrecisePageElement
impl Debug for PrecisePageElement
Source§impl<'de> Deserialize<'de> for PrecisePageElement
impl<'de> Deserialize<'de> for PrecisePageElement
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PrecisePageElement
impl PartialEq for PrecisePageElement
Source§impl Serialize for PrecisePageElement
impl Serialize for PrecisePageElement
impl StructuralPartialEq for PrecisePageElement
Auto Trait Implementations§
impl Freeze for PrecisePageElement
impl RefUnwindSafe for PrecisePageElement
impl Send for PrecisePageElement
impl Sync for PrecisePageElement
impl Unpin for PrecisePageElement
impl UnsafeUnpin for PrecisePageElement
impl UnwindSafe for PrecisePageElement
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