Skip to main content

MergeInput

Struct MergeInput 

Source
pub struct MergeInput<'a, R: Read + Seek + 'static> {
    pub source: &'a mut Pdf<R>,
    pub pages: Vec<usize>,
}
Expand description

One merge input: an opened source document and the 0-based page indices to take from it (arbitrary order, duplicates allowed).

Fields§

§source: &'a mut Pdf<R>

The opened source document.

The borrow lasts only for the merge call, but a provider-backed stream copied from this source remains lazy in the returned document and is re-read from this source on every later write or read of the returned document, not only the first. Keep the source Pdf alive for as long as the returned document may still access that copied stream, or call Pdf::set_immediate_copy_from on the source before merging when it must be released earlier. Parsed file-backed streams capture their input source separately and do not require this Pdf to remain alive.

§pages: Vec<usize>

0-based page indices to copy, in output order.

Auto Trait Implementations§

§

impl<'a, R> !RefUnwindSafe for MergeInput<'a, R>

§

impl<'a, R> !Send for MergeInput<'a, R>

§

impl<'a, R> !Sync for MergeInput<'a, R>

§

impl<'a, R> !UnwindSafe for MergeInput<'a, R>

§

impl<'a, R> Freeze for MergeInput<'a, R>
where &'a mut Pdf<R>: Freeze,

§

impl<'a, R> Unpin for MergeInput<'a, R>
where &'a mut Pdf<R>: Unpin,

§

impl<'a, R> UnsafeUnpin for MergeInput<'a, R>
where &'a mut Pdf<R>: UnsafeUnpin,

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

Source§

type Output = T

Should always be Self
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.