Struct mupdf::cookie::Cookie[][src]

pub struct Cookie { /* fields omitted */ }

Provide two-way communication between application and library. Intended for multi-threaded applications where one thread is rendering pages and another thread wants to read progress feedback or abort a job that takes a long time to finish. The communication is unsynchronized without locking.

Implementations

impl Cookie[src]

pub fn new() -> Result<Self, Error>[src]

pub fn abort(&mut self)[src]

Abort rendering

pub fn progress(&self) -> i32[src]

Communicates rendering progress back to the application. Increments as a page is being rendered.

pub fn max_progress(&self) -> usize[src]

Communicates the known upper bound of rendering back to the application

pub fn errors(&self) -> i32[src]

count of errors during current rendering

pub fn incomplete(&self) -> bool[src]

Initially should be set to 0. Will be set to non-zero if a TRYLATER error is thrown during rendering

pub fn set_incomplete(&mut self, value: bool)[src]

Trait Implementations

impl Debug for Cookie[src]

impl Drop for Cookie[src]

Auto Trait Implementations

impl RefUnwindSafe for Cookie

impl !Send for Cookie

impl !Sync for Cookie

impl Unpin for Cookie

impl UnwindSafe for Cookie

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.