Launch

Trait Launch 

Source
pub trait Launch {
    // Required method
    fn launch<'a>(
        &'a mut self,
        profile: &'a UserProfile,
        java_distribution: JavaDistribution,
    ) -> LaunchBuilder<'a, Self>
       where Self: Sized;
}

Required Methods§

Source

fn launch<'a>( &'a mut self, profile: &'a UserProfile, java_distribution: JavaDistribution, ) -> LaunchBuilder<'a, Self>
where Self: Sized,

Launch the game with a builder pattern

§Arguments
  • profile: User profile from authentication
  • java_distribution: Java distribution to use
§Returns

A LaunchBuilder for configuring JVM options and game arguments

§Example
// Simple launch
version.launch(&profile, JavaDistribution::Zulu).await?;

// With custom options
version.launch(&profile, JavaDistribution::Zulu)
    .with_jvm_options()
        .set("Xmx", "4G")
        .done()
    .with_arguments()
        .set(KEY_WIDTH, "1920")
        .done()
    .await?;

Implementors§

Source§

impl<T> Launch for T
where T: VersionInfo<LoaderType = Loader> + LoaderExtensions + Arguments + Installer,