#[non_exhaustive]pub enum Event<'a> {
Show 31 variants
FilterFeatures {
features: &'a mut HashSet<String>,
},
LoadedFeatures {
features: &'a HashSet<String>,
},
LoadHierarchy {
root_version: &'a str,
},
LoadedHierarchy {
hierarchy: &'a [LoadedVersion],
},
LoadVersion {
version: &'a str,
file: &'a Path,
},
NeedVersion {
version: &'a str,
file: &'a Path,
retry: &'a mut bool,
},
LoadedVersion {
version: &'a str,
file: &'a Path,
},
LoadClient,
LoadedClient {
file: &'a Path,
},
LoadLibraries,
FilterLibraries {
libraries: &'a mut Vec<LoadedLibrary>,
},
LoadedLibraries {
libraries: &'a [LoadedLibrary],
},
FilterLibrariesFiles {
class_files: &'a mut Vec<PathBuf>,
natives_files: &'a mut Vec<PathBuf>,
},
LoadedLibrariesFiles {
class_files: &'a [PathBuf],
natives_files: &'a [PathBuf],
},
NoLogger,
LoadLogger {
id: &'a str,
},
LoadedLogger {
id: &'a str,
},
NoAssets,
LoadAssets {
id: &'a str,
},
LoadedAssets {
id: &'a str,
count: usize,
},
VerifiedAssets {
id: &'a str,
count: usize,
},
LoadJvm {
major_version: u32,
},
FoundJvmSystemVersion {
file: &'a Path,
version: &'a str,
compatible: bool,
},
WarnJvmUnsupportedDynamicCrt,
WarnJvmUnsupportedPlatform,
WarnJvmMissingDistribution,
LoadedJvm {
file: &'a Path,
version: Option<&'a str>,
compatible: bool,
},
DownloadResources {
cancel: &'a mut bool,
},
DownloadedResources,
DownloadProgress {
count: u32,
total_count: u32,
size: u32,
total_size: u32,
},
ExtractedBinaries {
dir: &'a Path,
},
}Expand description
Events happening when installing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
FilterFeatures
Filter the features that will be later used to filter rules using them.
LoadedFeatures
Notification of all features that have been selected after filtering.
LoadHierarchy
The version hierarchy will be loaded, starting from the given root version.
LoadedHierarchy
The given version hierarchy has been successfully loaded.
Fields
hierarchy: &'a [LoadedVersion]LoadVersion
A version will be loaded, at this point you can check the file for its
validity, and delete it if relevant, in this case Self::NeedVersion
is called just after to possibly install the version metadata.
NeedVersion
This event is called if the given version is missing a metadata file, in this case its path is given and this handler has the possibility of installing it before retrying. If the handler actually wants the loading to be retried after it as handled it, it should return true.
LoadedVersion
The given version in the hierarchy has been successfully loaded, the metadata file path is also given.
LoadClient
The client JAR file will be loaded.
LoadedClient
The client JAR file has been loaded successfully at the given path.
LoadLibraries
The game required libraries are going to be loaded.
FilterLibraries
Filter versions before their verification.
Fields
libraries: &'a mut Vec<LoadedLibrary>LoadedLibraries
Libraries have been loaded. After that, the libraries will be verified and added to the downloads list if missing.
Fields
libraries: &'a [LoadedLibrary]FilterLibrariesFiles
Libraries have been verified. Note that all paths will be canonicalized, relatively to the current process’ working dir, before being added to the command line, so the files must exists.
LoadedLibrariesFiles
The final version of class and natives files has been loaded.
NoLogger
No logger configuration will be loaded because version doesn’t specify any.
LoadLogger
The logger configuration will be loaded.
LoadedLogger
Logger configuration has been loaded successfully.
NoAssets
Assets will not be loaded because version doesn’t specify any.
LoadAssets
Assets will be loaded.
LoadedAssets
Assets have been loaded, and are going to be verified in order to add missing ones to the download batch.
VerifiedAssets
Assets have been verified and missing assets have been added to the download batch.
LoadJvm
The JVM will be loaded, depending on the policy configured in the installer. The major version that is required is given, when not specified by any version metadata it defaults to Java 8, because most older versions didn’t specify it.
FoundJvmSystemVersion
When searching for JVMs in the system standard paths, this event trigger for each detected JVM executable, and indicates if this version is compatible and therefore is a potential candidate for being used as the JVM.
WarnJvmUnsupportedDynamicCrt
The system runs on Linux and has C runtime not dynamically linked (static, musl for example), suggesting that your system doesn’t provide dynamic C runtime (glibc), and such JVM are not provided by Mojang.
WarnJvmUnsupportedPlatform
When trying to find a Mojang JVM to install, your operating system and architecture are not supported.
WarnJvmMissingDistribution
When trying to find a Mojang JVM to install, your operating system and architecture are supported but the distribution (the java version packaged and distributed by Mojang) is not found.
LoadedJvm
The JVM has been loaded, if the version is known. The compatible flag indicates if this JVM is likely compatible with the game version, when false it indicates that it will likely be incompatible.
DownloadResources
Resources will be downloaded. This function returns a boolean that indicates if the download should proceed, this can be used to abort
DownloadedResources
Resources have been successfully downloaded.
DownloadProgress
A download progress forwarded from a download handler.
ExtractedBinaries
All binaries has been successfully extracted to the given binary directory.