Struct pdf::file::File

source ·
pub struct File<B, OC, SC, L> {
    pub trailer: Trailer,
    /* private fields */
}

Fields§

§trailer: Trailer

Implementations§

source§

impl<OC, SC, L> File<Vec<u8>, OC, SC, L>where OC: Cache<Result<AnySync, Arc<PdfError>>>, SC: Cache<Result<Arc<[u8]>, Arc<PdfError>>>, L: Log,

source

pub fn save_to(&mut self, path: impl AsRef<Path>) -> Result<()>

source§

impl<B, OC, SC, L> File<B, OC, SC, L>where B: Backend, OC: Cache<Result<AnySync, Arc<PdfError>>>, SC: Cache<Result<Arc<[u8]>, Arc<PdfError>>>, L: Log,

source

pub fn new(storage: Storage<B, OC, SC, L>, trailer: Trailer) -> Self

source

pub fn resolver(&self) -> impl Resolve + '_

source

pub fn get_root(&self) -> &Catalog

source

pub fn pages(&self) -> impl Iterator<Item = Result<PageRc>> + '_

source

pub fn num_pages(&self) -> u32

source

pub fn get_page(&self, n: u32) -> Result<PageRc>

source

pub fn update_catalog(&mut self, catalog: Catalog) -> Result<()>

source

pub fn set_options(&mut self, options: ParseOptions)

source

pub fn scan(&self) -> impl Iterator<Item = Result<ScanItem>> + '_

source

pub fn log(&self) -> &L

Trait Implementations§

source§

impl<B, OC, SC, L> Updater for File<B, OC, SC, L>where B: Backend, OC: Cache<Result<AnySync, Arc<PdfError>>>, SC: Cache<Result<Arc<[u8]>, Arc<PdfError>>>, L: Log,

source§

fn create<T: ObjectWrite>(&mut self, obj: T) -> Result<RcRef<T>>

source§

fn update<T: ObjectWrite>(&mut self, old: PlainRef, obj: T) -> Result<RcRef<T>>

source§

fn promise<T: Object>(&mut self) -> PromisedRef<T>

source§

fn fulfill<T: ObjectWrite>( &mut self, promise: PromisedRef<T>, obj: T ) -> Result<RcRef<T>>

Auto Trait Implementations§

§

impl<B, OC, SC, L> RefUnwindSafe for File<B, OC, SC, L>where B: RefUnwindSafe, L: RefUnwindSafe, OC: RefUnwindSafe, SC: RefUnwindSafe,

§

impl<B, OC, SC, L> Send for File<B, OC, SC, L>where B: Send, L: Send, OC: Send, SC: Send,

§

impl<B, OC, SC, L> Sync for File<B, OC, SC, L>where B: Sync, L: Sync, OC: Sync, SC: Sync,

§

impl<B, OC, SC, L> Unpin for File<B, OC, SC, L>where B: Unpin, L: Unpin, OC: Unpin, SC: Unpin,

§

impl<B, OC, SC, L> UnwindSafe for File<B, OC, SC, L>where B: UnwindSafe, L: UnwindSafe, OC: UnwindSafe, SC: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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

§

type Output = T

Should always be Self
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.