pub struct ProcessWrapper<T> { /* private fields */ }
Expand description
Wrapper for a process execution that allows awaiting or aborting the process
Implementations§
Source§impl<T> ProcessWrapper<T>where
T: DeserializeOwned,
impl<T> ProcessWrapper<T>where
T: DeserializeOwned,
Sourcepub fn wait(&mut self) -> Result<T, ProcessFunError>
pub fn wait(&mut self) -> Result<T, ProcessFunError>
Wait for the process to complete and return its result
Sourcepub fn timeout(&mut self, duration: Duration) -> Result<T, ProcessFunError>
pub fn timeout(&mut self, duration: Duration) -> Result<T, ProcessFunError>
Wait for the process to complete with a timeout
Source§impl<T> ProcessWrapper<T>
impl<T> ProcessWrapper<T>
Sourcepub fn abort(&mut self) -> Result<(), ProcessFunError>
pub fn abort(&mut self) -> Result<(), ProcessFunError>
Abort the process
Trait Implementations§
Source§impl<T: Debug> Debug for ProcessWrapper<T>
impl<T: Debug> Debug for ProcessWrapper<T>
Source§impl<T> Display for ProcessWrapper<T>
impl<T> Display for ProcessWrapper<T>
Auto Trait Implementations§
impl<T> Freeze for ProcessWrapper<T>
impl<T> RefUnwindSafe for ProcessWrapper<T>where
T: RefUnwindSafe,
impl<T> Send for ProcessWrapper<T>where
T: Send,
impl<T> Sync for ProcessWrapper<T>where
T: Sync,
impl<T> Unpin for ProcessWrapper<T>where
T: Unpin,
impl<T> UnwindSafe for ProcessWrapper<T>where
T: UnwindSafe,
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