#[non_exhaustive]pub enum Item {
Rect {
rect: Rect,
fill: Option<Color>,
stroke: Option<(f32, Color)>,
radius: f32,
},
Ellipse {
rect: Rect,
fill: Option<Color>,
stroke: Option<(f32, Color)>,
},
Line {
from: Point,
to: Point,
width: f32,
color: Color,
},
Text(TextBlock),
Image {
rect: Rect,
clip: Rect,
image: DocumentImage,
},
Vector {
rect: Rect,
shapes: Vec<Shape>,
},
Link {
rect: Rect,
url: String,
},
Bookmark {
title: String,
level: u32,
y: f32,
},
}Expand description
A printed primitive.
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.
Rect
A filled and/or outlined rectangle.
Fields
Ellipse
A filled and/or outlined ellipse inscribed in rect.
Fields
Line
A straight line.
Text(TextBlock)
Lines of text in one font, clipped to a box.
Image
An image.
Fields
§
image: DocumentImageThe image.
Vector
Vector shapes that belong together, such as a chart or a barcode. PDF and SVG write them as they are; the screen and spreadsheets get them as one picture.
Fields
Link
An area that opens an address when clicked. Prints nothing.
Bookmark
An entry in the document’s outline. Prints nothing.
Trait Implementations§
impl StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnsafeUnpin for Item
impl UnwindSafe for Item
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