[−][src]Struct mupdf_sys::fz_cookie
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.
abort: The application should set this field to 0 before calling fz_run_page to render a page. At any point when the page is being rendered the application my set this field to 1 which will cause the rendering to finish soon. This field is checked periodically when the page is rendered, but exactly when is not known, therefore there is no upper bound on exactly when the rendering will abort. If the application did not provide a set of locks to fz_new_context, it must also await the completion of fz_run_page before issuing another call to fz_run_page. Note that once the application has set this field to 1 after it called fz_run_page it may not change the value again.
progress: Communicates rendering progress back to the application and is read only. Increments as a page is being rendered. The value starts out at 0 and is limited to less than or equal to progress_max, unless progress_max is -1.
progress_max: Communicates the known upper bound of rendering back to the application and is read only. The maximum value that the progress field may take. If there is no known upper bound on how long the rendering may take this value is -1 and progress is not limited. Note that the value of progress_max may change from -1 to a positive value once an upper bound is known, so take this into consideration when comparing the value of progress to that of progress_max.
errors: count of errors during current rendering.
incomplete: Initially should be set to 0. Will be set to non-zero if a TRYLATER error is thrown during rendering.
Fields
abort: c_int
progress: c_int
progress_max: usize
errors: c_int
incomplete: c_int
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for fz_cookie
[src]
impl Send for fz_cookie
[src]
impl Sync for fz_cookie
[src]
impl Unpin for fz_cookie
[src]
impl UnwindSafe for fz_cookie
[src]
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,