pub struct Worker { /* private fields */ }Implementations§
Source§impl Worker
impl Worker
pub fn new(wasm_path: impl Into<String>, entry_name: impl Into<String>) -> Self
pub fn on_progress( self, handler: impl Fn(WorkerProgressEventArgs) + 'static, ) -> Self
pub fn on_complete( self, handler: impl Fn(WorkerCompletedEventArgs) + 'static, ) -> Self
pub fn on_error(self, handler: impl Fn(WorkerErrorEventArgs) + 'static) -> Self
pub fn start(self, input: impl Into<String>) -> Self
pub fn cancel(&self)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Worker
impl !Send for Worker
impl !Sync for Worker
impl !UnwindSafe for Worker
impl Freeze 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