pub struct GameProcessHandle { /* private fields */ }
Expand description
Handle to the game process.
Trait Implementations§
Source§impl Clone for GameProcessHandle
impl Clone for GameProcessHandle
Source§fn clone(&self) -> GameProcessHandle
fn clone(&self) -> GameProcessHandle
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GameProcessHandle
impl Debug for GameProcessHandle
Source§impl GameProcess for GameProcessHandle
impl GameProcess for GameProcessHandle
Source§fn launch(command: Command) -> LaunchResult<Self>
fn launch(command: Command) -> LaunchResult<Self>
Launches the game by forking the process. Communication to the forked process works through IPC channels. The handle should at some point be waited to avoid creating zombie processes.
Source§fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = LaunchResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = LaunchResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends a shutdown signal to the forked process. After this call the process should be waited to reap the zombie process.
Source§fn wait<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = LaunchResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn wait<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = LaunchResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Waits for the process to exit. This allows the OS to reap the created zombie process.
Source§fn is_stopped<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = LaunchResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_stopped<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = LaunchResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Checks whether the game is still running.
Source§fn is_stopped_blocking(&self) -> LaunchResult<bool>
fn is_stopped_blocking(&self) -> LaunchResult<bool>
Checks whether the game is still running.
Auto Trait Implementations§
impl Freeze for GameProcessHandle
impl !RefUnwindSafe for GameProcessHandle
impl Send for GameProcessHandle
impl Sync for GameProcessHandle
impl Unpin for GameProcessHandle
impl !UnwindSafe for GameProcessHandle
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