#[non_exhaustive]pub enum PositionedElement {
Text(GlyphRun),
Line {
start: Point,
end: Point,
width: f64,
color: Color,
dash_pattern: Option<(f64, f64)>,
},
FilledRect {
rect: Rect,
color: Color,
},
Image {
rect: Rect,
data: Vec<u8>,
content_type: String,
media_id: MediaId,
},
LinkAnnotation {
rect: Rect,
url: String,
},
Path(PathElement),
Group(GroupElement),
}Expand description
A positioned element on a page.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Text(GlyphRun)
A run of shaped text glyphs.
Line
A line segment (for borders, underlines, strikethrough).
Fields
FilledRect
A filled rectangle (for shading, highlights).
Image
An inline image.
LinkAnnotation
A link annotation (hyperlink).
Path(PathElement)
A backend-neutral filled or stroked path.
Group(GroupElement)
A nested group with one child-local transform.
Trait Implementations§
Source§impl Clone for PositionedElement
impl Clone for PositionedElement
Source§fn clone(&self) -> PositionedElement
fn clone(&self) -> PositionedElement
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 moreSource§impl Debug for PositionedElement
impl Debug for PositionedElement
Source§impl PartialEq for PositionedElement
impl PartialEq for PositionedElement
impl StructuralPartialEq for PositionedElement
Auto Trait Implementations§
impl Freeze for PositionedElement
impl RefUnwindSafe for PositionedElement
impl Send for PositionedElement
impl Sync for PositionedElement
impl Unpin for PositionedElement
impl UnsafeUnpin for PositionedElement
impl UnwindSafe for PositionedElement
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