pub trait GameProcess {
// Required methods
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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl GameProcess for GameProcessHandle
Available on Unix only.