Skip to main content

AnnotationType

Enum AnnotationType 

Source
pub enum AnnotationType {
Show 29 variants Text, Link, FreeText, Line, Square, Circle, Polygon, PolyLine, Highlight, Underline, Squiggly, StrikeOut, Stamp, Caret, Ink, Popup, FileAttachment, Sound, Widget, Movie, Screen, PrinterMark, TrapNet, Watermark, ThreeD, RichMedia, XFAWidget, Redact, Other,
}
Expand description

Annotation subtypes defined by the PDF specification.

Variants§

§

Text

Text (sticky note) annotation.

Link annotation.

§

FreeText

Free text annotation.

§

Line

Line annotation.

§

Square

Square annotation.

§

Circle

Circle annotation.

§

Polygon

Polygon annotation.

§

PolyLine

Polyline annotation.

§

Highlight

Highlight markup annotation.

§

Underline

Underline markup annotation.

§

Squiggly

Squiggly underline markup annotation.

§

StrikeOut

Strikeout markup annotation.

§

Stamp

Stamp annotation.

§

Caret

Caret annotation.

§

Ink

Ink annotation.

§

Popup

Popup annotation.

§

FileAttachment

File attachment annotation.

§

Sound

Sound annotation.

§

Widget

Widget annotation (form field).

§

Movie

Movie annotation.

§

Screen

Screen annotation.

§

PrinterMark

Printer’s mark annotation.

§

TrapNet

Trap network annotation.

§

Watermark

Watermark annotation.

§

ThreeD

3D annotation.

§

RichMedia

Rich media annotation.

§

XFAWidget

XFA widget annotation.

§

Redact

Redaction annotation.

§

Other

Unrecognized annotation subtype.

Implementations§

Source§

impl AnnotationType

Source

pub fn supports_ap_objects(&self) -> bool

Returns true if this annotation subtype supports appearance stream (AP) object manipulation via FPDFAnnot_AppendObject etc.

The supported subtypes are: Stamp, FreeText, Ink, Square, Circle, Polygon, PolyLine, Line, Highlight, Underline, Squiggly, StrikeOut.

Corresponds to FPDFAnnot_IsObjectSupportedSubtype().

Source

pub fn annot_is_object_supported_subtype(&self) -> bool

ADR-019 alias for Self::supports_ap_objects().

Corresponds to FPDFAnnot_IsObjectSupportedSubtype().

Source

pub fn is_object_supported_subtype(&self) -> bool

👎Deprecated since 0.1.0:

use annot_is_object_supported_subtype() instead

Deprecated: use annot_is_object_supported_subtype() instead.

Source

pub fn is_ap_object_supported(&self) -> bool

👎Deprecated since 0.1.0:

use annot_is_object_supported_subtype() instead

Deprecated: use annot_is_object_supported_subtype() instead.

Source

pub fn is_supported_for_creation(&self) -> bool

Returns whether this annotation subtype is currently supported for creation.

Currently supported subtypes: circle, fileattachment, freetext, highlight, ink, link, popup, square, squiggly, stamp, strikeout, text, underline.

Corresponds to FPDFAnnot_IsSupportedSubtype.

Source

pub fn annot_is_supported_subtype(&self) -> bool

ADR-019 alias for Self::is_supported_for_creation().

Corresponds to FPDFAnnot_IsSupportedSubtype.

Source

pub fn is_supported_subtype(&self) -> bool

👎Deprecated since 0.1.0:

use annot_is_supported_subtype() instead

Deprecated: use annot_is_supported_subtype() instead.

Source

pub fn from_name(name: &str) -> Self

Parse an annotation subtype from a PDF name string.

Source

pub fn to_name(&self) -> &'static str

Returns the PDF subtype name string for this annotation type. Inverse of from_name(). Corresponds to upstream AnnotSubtypeToString().

Trait Implementations§

Source§

impl Clone for AnnotationType

Source§

fn clone(&self) -> AnnotationType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AnnotationType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for AnnotationType

Source§

fn eq(&self, other: &AnnotationType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for AnnotationType

Source§

impl Eq for AnnotationType

Source§

impl StructuralPartialEq for AnnotationType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more