pub struct VersionMeta {
pub inherits_from: String,
pub client_version: String,
pub java_version: Option<JavaVersion>,
pub arguments: Option<Arguments>,
pub minecraft_arguments: String,
pub asset_index: Option<AssetIndex>,
pub downloads: Option<BTreeMap<String, DownloadItem>>,
pub libraries: Vec<Library>,
pub logging: Option<Logging>,
pub main_class: String,
pub main_jars: Vec<String>,
}
Expand description
版本元数据
Fields§
§inherits_from: String
继承某个版本
client_version: String
1.12 以前的继承版本
java_version: Option<JavaVersion>
新版本的 Java 版本元数据
如果存在则可以根据此数据选择对应的 Java 运行时
arguments: Option<Arguments>
游戏启动参数
minecraft_arguments: String
游戏启动参数 旧版本
asset_index: Option<AssetIndex>
资源索引元数据
downloads: Option<BTreeMap<String, DownloadItem>>
该版本需要下载的主要游戏文件信息
libraries: Vec<Library>
该版本所需的依赖库列表
logging: Option<Logging>
该版本元数据的日志输出配置
main_class: String
该版本元数据的主类
main_jars: Vec<String>
该版本元数据的主类列表,因为有可能存在多个主类 JAR
Implementations§
Source§impl VersionMeta
impl VersionMeta
Sourcepub fn required_java_version(&self) -> u8
pub fn required_java_version(&self) -> u8
根据元数据判断需要的最低 Java 运行时版本
Trait Implementations§
Source§impl AddAssign for VersionMeta
impl AddAssign for VersionMeta
Source§fn add_assign(&mut self, data: VersionMeta)
fn add_assign(&mut self, data: VersionMeta)
Performs the
+=
operation. Read moreSource§impl Clone for VersionMeta
impl Clone for VersionMeta
Source§fn clone(&self) -> VersionMeta
fn clone(&self) -> VersionMeta
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VersionMeta
impl Debug for VersionMeta
Source§impl<'de> Deserialize<'de> for VersionMeta
impl<'de> Deserialize<'de> for VersionMeta
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for VersionMeta
impl PartialEq for VersionMeta
Source§impl Serialize for VersionMeta
impl Serialize for VersionMeta
impl Eq for VersionMeta
impl StructuralPartialEq for VersionMeta
Auto Trait Implementations§
impl Freeze for VersionMeta
impl RefUnwindSafe for VersionMeta
impl Send for VersionMeta
impl Sync for VersionMeta
impl Unpin for VersionMeta
impl UnwindSafe for VersionMeta
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.