pub struct CaretAnnotation {
pub rect: Rect,
pub symbol: CaretSymbol,
pub rd: Option<(f64, f64, f64, f64)>,
pub contents: Option<String>,
pub author: Option<String>,
pub subject: Option<String>,
pub color: Option<AnnotationColor>,
pub flags: AnnotationFlags,
}Expand description
A Caret annotation per PDF spec Section 12.5.6.11.
Caret annotations mark a position in the document text where content should be inserted or where a correction is needed.
Fields§
§rect: RectBounding rectangle for the caret
symbol: CaretSymbolSymbol to display (None or Paragraph)
rd: Option<(f64, f64, f64, f64)>Optional rectangle difference for the caret
contents: Option<String>Contents/comment
Author
subject: Option<String>Subject
color: Option<AnnotationColor>Color
flags: AnnotationFlagsAnnotation flags
Implementations§
Source§impl CaretAnnotation
impl CaretAnnotation
Sourcepub fn with_symbol(self, symbol: CaretSymbol) -> Self
pub fn with_symbol(self, symbol: CaretSymbol) -> Self
Set the caret symbol.
Sourcepub fn with_rd(self, left: f64, bottom: f64, right: f64, top: f64) -> Self
pub fn with_rd(self, left: f64, bottom: f64, right: f64, top: f64) -> Self
Set the rectangle difference (RD).
Sourcepub fn with_contents(self, contents: impl Into<String>) -> Self
pub fn with_contents(self, contents: impl Into<String>) -> Self
Set contents/comment.
Set the author.
Sourcepub fn with_subject(self, subject: impl Into<String>) -> Self
pub fn with_subject(self, subject: impl Into<String>) -> Self
Set the subject.
Sourcepub fn with_color(self, color: AnnotationColor) -> Self
pub fn with_color(self, color: AnnotationColor) -> Self
Set the color.
Sourcepub fn with_flags(self, flags: AnnotationFlags) -> Self
pub fn with_flags(self, flags: AnnotationFlags) -> Self
Set annotation flags.
Trait Implementations§
Source§impl Clone for CaretAnnotation
impl Clone for CaretAnnotation
Source§fn clone(&self) -> CaretAnnotation
fn clone(&self) -> CaretAnnotation
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 CaretAnnotation
impl Debug for CaretAnnotation
Source§impl Default for CaretAnnotation
impl Default for CaretAnnotation
Source§impl From<CaretAnnotation> for Annotation
impl From<CaretAnnotation> for Annotation
Source§fn from(caret: CaretAnnotation) -> Self
fn from(caret: CaretAnnotation) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CaretAnnotation
impl RefUnwindSafe for CaretAnnotation
impl Send for CaretAnnotation
impl Sync for CaretAnnotation
impl Unpin for CaretAnnotation
impl UnwindSafe for CaretAnnotation
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