Struct cobble_core::minecraft::GameProcessHandle
source · pub struct GameProcessHandle { /* private fields */ }
Available on Unix only.
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.