pub struct PdfiumDocument { /* private fields */ }Expand description
Rust interface to FPDF_DOCUMENT
Implementations§
Source§impl PdfiumDocument
impl PdfiumDocument
pub fn new_from_path<P: AsRef<Path>>( path: P, password: Option<&str>, ) -> PdfiumResult<Self>
pub fn new_from_reader<R: Read + Seek + 'static>( reader: R, password: Option<&str>, ) -> PdfiumResult<Self>
pub fn page_count(&self) -> i32
Sourcepub fn page(&self, index: i32) -> PdfiumResult<PdfiumPage>
pub fn page(&self, index: i32) -> PdfiumResult<PdfiumPage>
Returns the PdfiumPage indicated by index from this PdfiumDocument.
Trait Implementations§
Source§impl Drop for PdfiumDocument
impl Drop for PdfiumDocument
Source§fn drop(&mut self)
fn drop(&mut self)
Closes this PdfiumDocument, releasing held memory.
Source§impl From<&PdfiumDocument> for FPDF_DOCUMENT
impl From<&PdfiumDocument> for FPDF_DOCUMENT
Source§fn from(value: &PdfiumDocument) -> Self
fn from(value: &PdfiumDocument) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PdfiumDocument
impl !RefUnwindSafe for PdfiumDocument
impl !Send for PdfiumDocument
impl !Sync for PdfiumDocument
impl Unpin for PdfiumDocument
impl !UnwindSafe for PdfiumDocument
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
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>
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 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>
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