pub struct WorkerProcess { /* private fields */ }Expand description
Managed worker subprocess.
Implementations§
Source§impl WorkerProcess
impl WorkerProcess
Sourcepub async fn spawn(
program: PathBuf,
args: &[String],
runtime: RuntimeKind,
) -> Result<Self>
pub async fn spawn( program: PathBuf, args: &[String], runtime: RuntimeKind, ) -> Result<Self>
Spawn a worker.
Sourcepub async fn request(
&mut self,
env: Envelope,
wait: Duration,
) -> Result<Envelope>
pub async fn request( &mut self, env: Envelope, wait: Duration, ) -> Result<Envelope>
Send a request and wait for a matching response.
Auto Trait Implementations§
impl !RefUnwindSafe for WorkerProcess
impl !UnwindSafe for WorkerProcess
impl Freeze for WorkerProcess
impl Send for WorkerProcess
impl Sync for WorkerProcess
impl Unpin for WorkerProcess
impl UnsafeUnpin for WorkerProcess
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