FileOptions

Struct FileOptions 

Source
pub struct FileOptions<'a, OC, SC, L> { /* private fields */ }

Implementations§

Source§

impl FileOptions<'static, NoCache, NoCache, NoLog>

Source

pub fn uncached() -> Self

Source§

impl FileOptions<'static, ObjectCache, StreamCache, NoLog>

Source

pub fn cached() -> Self

Source§

impl<'a, OC, SC, L> FileOptions<'a, OC, SC, L>
where OC: Cache<Result<AnySync, Arc<PdfError>>>, SC: Cache<Result<Arc<[u8]>, Arc<PdfError>>>, L: Log,

Source

pub fn password(self, password: &'a [u8]) -> FileOptions<'a, OC, SC, L>

Source

pub fn cache<O, S>(self, oc: O, sc: S) -> FileOptions<'a, O, S, L>

Source

pub fn log<Log>(self, log: Log) -> FileOptions<'a, OC, SC, Log>

Source

pub fn parse_options(self, parse_options: ParseOptions) -> Self

Source

pub fn open(self, path: impl AsRef<Path>) -> Result<File<Vec<u8>, OC, SC, L>>

open a file

Source

pub fn storage(self) -> Storage<Vec<u8>, OC, SC, L>

Source

pub fn load<B: Backend>(self, backend: B) -> Result<File<B, OC, SC, L>>

load data from the given backend

Auto Trait Implementations§

§

impl<'a, OC, SC, L> Freeze for FileOptions<'a, OC, SC, L>
where OC: Freeze, SC: Freeze, L: Freeze,

§

impl<'a, OC, SC, L> RefUnwindSafe for FileOptions<'a, OC, SC, L>

§

impl<'a, OC, SC, L> Send for FileOptions<'a, OC, SC, L>
where OC: Send, SC: Send, L: Send,

§

impl<'a, OC, SC, L> Sync for FileOptions<'a, OC, SC, L>
where OC: Sync, SC: Sync, L: Sync,

§

impl<'a, OC, SC, L> Unpin for FileOptions<'a, OC, SC, L>
where OC: Unpin, SC: Unpin, L: Unpin,

§

impl<'a, OC, SC, L> UnwindSafe for FileOptions<'a, OC, SC, L>
where OC: UnwindSafe, SC: UnwindSafe, L: UnwindSafe,

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> 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 = 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.