pub struct Worker { /* private fields */ }Expand description
One child process with bounded messages, cancellation and failure cleanup. Applications own the scheduling queue and decide when to recycle or retire it.
Implementations§
Source§impl Worker
impl Worker
pub fn requests_completed(&self) -> usize
pub fn spawn(program: &Path, worker_argument: &str) -> Result<Self>
Sourcepub fn render(
&mut self,
source: &str,
light: bool,
options: RasterOptions,
timeout: Duration,
cancel: &AtomicBool,
) -> Result<Option<Raster>>
pub fn render( &mut self, source: &str, light: bool, options: RasterOptions, timeout: Duration, cancel: &AtomicBool, ) -> Result<Option<Raster>>
Render one diagram off the UI thread. Any error stops and reaps the worker; subsequent calls fail until the application creates a new handle.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Worker
impl !Sync for Worker
impl !UnwindSafe for Worker
impl Freeze for Worker
impl Send for Worker
impl Unpin for Worker
impl UnsafeUnpin for Worker
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more