Struct mupdf::cookie::Cookie [−][src]
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,