Skip to main content

PdfLink

Struct PdfLink 

Source
pub struct PdfLink<'a> { /* private fields */ }
Expand description

A single link contained within a PdfPage or a PdfPageAnnotation.

Each link may have a corresponding [PdfAction] that will be triggered when the user interacts with the link, and a [PdfDestination] that indicates the target of any behaviour triggered by the [PdfAction].

Implementations§

Source§

impl<'a> PdfLink<'a>

Source

pub fn bindings(&self) -> &'a dyn PdfiumLibraryBindings

Returns the PdfiumLibraryBindings used by this PdfLink.

Source

pub fn action(&self) -> Option<PdfAction<'a>>

Returns the [PdfAction] associated with this PdfLink, if any.

The action indicates the behaviour that will occur when the user interacts with the link in a PDF viewer. For most links, this will be a local navigation action of type [PdfActionType::GoToDestinationInSameDocument], but the PDF file format supports a variety of other actions.

Source

pub fn destination(&self) -> Option<PdfDestination<'a>>

Returns the [PdfDestination] associated with this PdfLink, if any.

The destination specifies the page and region, if any, that will be the target of any behaviour that will occur when the user interacts with the link in a PDF viewer.

Source

pub fn rect(&self) -> Result<PdfRect, PdfiumError>

Returns the area on the page that the user can use to interact with this PdfLink in a PDF viewer, if any.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for PdfLink<'a>

§

impl<'a> !Send for PdfLink<'a>

§

impl<'a> !Sync for PdfLink<'a>

§

impl<'a> !UnwindSafe for PdfLink<'a>

§

impl<'a> Freeze for PdfLink<'a>

§

impl<'a> Unpin for PdfLink<'a>

§

impl<'a> UnsafeUnpin for PdfLink<'a>

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.