pub struct Annotation {
pub kind: AnnotationKind,
pub rect: [f64; 4],
pub contents: Option<String>,
pub name: Option<String>,
pub modified: Option<AnnotationDate>,
pub title: Option<String>,
pub subject: Option<String>,
pub flags: AnnotationFlags,
pub color: Option<AnnotationColor>,
pub border: Option<Border>,
pub has_appearance: bool,
pub kind_data: AnnotationKindData,
}Expand description
One PDF annotation.
Common fields (rect, contents, flags, color, border, appearance)
live directly on this struct. Subtype-specific fields live in
AnnotationKindData.
Fields§
§kind: AnnotationKind/Subtype value, parsed into a typed enum.
rect: [f64; 4]/Rect — annotation rectangle in default user space
[llx, lly, urx, ury].
contents: Option<String>/Contents — text contents, alternate description, or the
markup text for markup annotations.
name: Option<String>/NM — unique annotation identifier within the document.
modified: Option<AnnotationDate>/M — modification timestamp.
title: Option<String>/T — title (annotator name) for markup annotations.
subject: Option<String>/Subj — subject (markup annotations).
flags: AnnotationFlags/F — annotation behavior flags.
color: Option<AnnotationColor>/C — color used for the annotation’s icon, border, or fill.
border: Option<Border>/Border — [hradius vradius width [dash array]].
has_appearance: bool/AP — appearance stream presence (we don’t expose the stream
itself; the renderer consumes it directly). true if the
annotation has any appearance entry.
kind_data: AnnotationKindDataSubtype-specific fields.
Trait Implementations§
Source§impl Clone for Annotation
impl Clone for Annotation
Source§fn clone(&self) -> Annotation
fn clone(&self) -> Annotation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for Annotation
impl RefUnwindSafe for Annotation
impl Send for Annotation
impl Sync for Annotation
impl Unpin for Annotation
impl UnsafeUnpin for Annotation
impl UnwindSafe for Annotation
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
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> ⓘ
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> ⓘ
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