Trait cobble_core::minecraft::GameProcess
source · pub trait GameProcess {
fn launch(command: Command) -> LaunchResult<Self>
where
Self: Sized;
fn stop<'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;
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_blocking(&self) -> LaunchResult<bool>;
}
Expand description
Trait for game handles to provide the same API on all platforms.
Required Methods§
sourcefn launch(command: Command) -> LaunchResult<Self>where
Self: Sized,
fn launch(command: Command) -> LaunchResult<Self>where
Self: Sized,
Should launch the game in a detached state.
sourcefn 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,
Should stop the game.
sourcefn 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,
Should wait until the game has exited.
sourcefn 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,
Should check whether the game is still running.
sourcefn is_stopped_blocking(&self) -> LaunchResult<bool>
fn is_stopped_blocking(&self) -> LaunchResult<bool>
Should check whether the game is still running.