Storage

Struct Storage 

Source
pub struct Storage<B, OC, SC, L> { /* private fields */ }

Implementations§

Source§

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

Source

pub fn empty(object_cache: OC, stream_cache: SC, log: L) -> Self

Source§

impl<B, OC, SC, L> Storage<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 into_inner(self) -> B

Source

pub fn version(&self) -> Result<String>

Source

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

Source

pub fn with_cache( backend: B, options: ParseOptions, object_cache: OC, stream_cache: SC, log: L, ) -> Result<Self>

Source

pub fn load_storage_and_trailer(&mut self) -> Result<Dictionary>

Source

pub fn load_storage_and_trailer_password( &mut self, password: &[u8], ) -> Result<Dictionary>

Source

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

Source§

impl<OC, SC, L> Storage<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(&mut self, trailer: &mut Trailer) -> Result<&[u8]>

Trait Implementations§

Source§

impl<B, OC, SC, L> Updater for Storage<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> Freeze for Storage<B, OC, SC, L>
where OC: Freeze, SC: Freeze, B: Freeze, L: Freeze,

§

impl<B, OC, SC, L> RefUnwindSafe for Storage<B, OC, SC, L>

§

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

§

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

§

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

§

impl<B, OC, SC, L> UnwindSafe for Storage<B, OC, SC, L>
where OC: UnwindSafe, SC: UnwindSafe, B: 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.