pub struct WorkerController<W: Component> { /* private fields */ }
Expand description
Sends inputs to a worker. On drop, shuts down the worker.
Implementations§
Source§impl<W: Component> WorkerController<W>
impl<W: Component> WorkerController<W>
Sourcepub fn detach_runtime(&mut self)
pub fn detach_runtime(&mut self)
Dropping this type will usually stop the runtime of the worker.
With this method you can give the runtime a static lifetime.
In other words, dropping the WorkerController
will not stop
the runtime anymore, it will run until the app is closed.
Trait Implementations§
Auto Trait Implementations§
impl<W> Freeze for WorkerController<W>
impl<W> RefUnwindSafe for WorkerController<W>
impl<W> Send for WorkerController<W>
impl<W> Sync for WorkerController<W>
impl<W> Unpin for WorkerController<W>
impl<W> UnwindSafe for WorkerController<W>
Blanket Implementations§
Source§impl<C> AsyncPosition<()> for C
impl<C> AsyncPosition<()> for C
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