pub struct Version {
pub minecraft_version: String,
pub major_version: String,
pub version: i32,
pub data_version: i32,
pub edition: Edition,
pub release_type: String,
}Expand description
Represents a specific Minecraft version with associated metadata.
This struct is used for version comparisons and lookups.
Fields§
§minecraft_version: StringThe user-facing Minecraft version string (e.g., “1.18.2”).
major_version: StringThe major version string (e.g., “1.18”).
version: i32The protocol version number.
data_version: i32The data version number, used for reliable comparisons between versions of the same edition. Higher data versions are newer. This is calculated if missing in source data.
edition: EditionThe edition (PC or Bedrock).
release_type: StringThe release type (e.g., “release”, “snapshot”).
Trait Implementations§
Source§impl Ord for Version
impl Ord for Version
Source§impl PartialOrd for Version
impl PartialOrd for Version
impl Eq for Version
impl StructuralPartialEq for Version
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnwindSafe for Version
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.