Struct cobble_core::minecraft::GameProcessHandle
source · pub struct GameProcessHandle { /* private fields */ }
Available on Unix only.
Expand description
Handle to the game process.
Trait Implementations
sourceimpl Clone for GameProcessHandle
impl Clone for GameProcessHandle
sourcefn clone(&self) -> GameProcessHandle
fn clone(&self) -> GameProcessHandle
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for GameProcessHandle
impl Debug for GameProcessHandle
sourceimpl GameProcess for GameProcessHandle
impl GameProcess for GameProcessHandle
sourcefn 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.
sourcefn stop<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = LaunchResult<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn stop<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = LaunchResult<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Sends a shutdown signal to the forked process. After this call the process should be waited to reap the zombie process.
sourcefn wait<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = LaunchResult<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn wait<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = LaunchResult<()>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Waits for the process to exit. This allows the OS to reap the created zombie process.
sourcefn is_stopped<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = LaunchResult<bool>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn is_stopped<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = LaunchResult<bool>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Checks whether the game is still running.
sourcefn is_stopped_blocking(&self) -> LaunchResult<bool>
fn is_stopped_blocking(&self) -> LaunchResult<bool>
Checks whether the game is still running.
Auto Trait Implementations
impl !RefUnwindSafe for GameProcessHandle
impl Send for GameProcessHandle
impl Sync for GameProcessHandle
impl Unpin for GameProcessHandle
impl !UnwindSafe for GameProcessHandle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more