pub enum M2Version {
Vanilla,
TBC,
WotLK,
Cataclysm,
MoP,
WoD,
Legion,
BfA,
Shadowlands,
Dragonflight,
TheWarWithin,
}Expand description
M2 format versions across WoW expansions
Variants§
Vanilla
Vanilla (1.x)
TBC
The Burning Crusade (2.x)
WotLK
Wrath of the Lich King (3.x)
Cataclysm
Cataclysm (4.x)
MoP
Mists of Pandaria (5.x)
WoD
Warlords of Draenor (6.x)
Legion
Legion (7.x)
BfA
Battle for Azeroth (8.x)
Shadowlands
Shadowlands (9.x)
Dragonflight
Dragonflight (10.x)
TheWarWithin
The War Within (11.x+)
Implementations§
Source§impl M2Version
impl M2Version
Sourcepub fn from_string(s: &str) -> Result<Self>
pub fn from_string(s: &str) -> Result<Self>
Parse version from a string (e.g., “1.12.1”, “3.3.5a”, “4.3.4”)
Sourcepub fn from_expansion_name(s: &str) -> Result<Self>
pub fn from_expansion_name(s: &str) -> Result<Self>
Parse version from expansion short names or numeric versions Supports both numeric versions (e.g., “3.3.5a”) and short names (e.g., “WotLK”, “TBC”)
Sourcepub fn from_header_version(version: u32) -> Option<Self>
pub fn from_header_version(version: u32) -> Option<Self>
Convert header version number to M2Version enum Based on empirical analysis of WoW versions 1.12.1 through 5.4.8 Updated to handle Legion+ chunked format versions (272+)
Sourcepub fn to_header_version(&self) -> u32
pub fn to_header_version(&self) -> u32
Convert M2Version enum to header version number Returns empirically verified version numbers for WoW 1.12.1 through 5.4.8 Updated to handle Legion+ chunked format versions
Sourcepub fn expansion_name(&self) -> &'static str
pub fn expansion_name(&self) -> &'static str
Get the WoW expansion name for this version
Sourcepub fn to_version_string(&self) -> &'static str
pub fn to_version_string(&self) -> &'static str
Get common version string representation (e.g., “3.3.5a” for WotLK)
Sourcepub fn has_direct_conversion_path(&self, target: &Self) -> bool
pub fn has_direct_conversion_path(&self, target: &Self) -> bool
Check if a direct conversion path exists between two versions
Sourcepub fn supports_chunked_format(&self) -> bool
pub fn supports_chunked_format(&self) -> bool
Returns true if this version supports chunked format capability Based on empirical analysis: chunked format capability introduced in v264 (WotLK) but not actually used until Legion (versions 272+)
Sourcepub fn uses_external_chunks(&self) -> bool
pub fn uses_external_chunks(&self) -> bool
Returns true if this version uses external chunks Based on empirical analysis: no external chunks found through MoP 5.4.8 External chunks introduced with Legion+ (versions 272+)
Sourcepub fn uses_inline_data(&self) -> bool
pub fn uses_inline_data(&self) -> bool
Returns true if this version uses inline data structure Based on empirical analysis: 100% inline data through MoP 5.4.8 Legion+ versions use chunked data with FileDataID references
Sourcepub fn uses_new_skin_format(&self) -> bool
pub fn uses_new_skin_format(&self) -> bool
Returns true if this version uses the new skin format (with version field)
WotLK introduced external .skin files but used the old format (no version field). Cataclysm introduced the new skin format with a version field.
- Old format: magic + arrays (no version field) - used by WotLK and earlier
- New format: magic + version + name + vertex_count + arrays - used by Cataclysm+
Sourcepub fn empirical_version_number(&self) -> Option<u32>
pub fn empirical_version_number(&self) -> Option<u32>
Get the empirically verified version number for this M2 version Returns None if the version was not part of the empirical analysis
Sourcepub fn requires_chunked_format(&self) -> bool
pub fn requires_chunked_format(&self) -> bool
Returns true if this version requires chunked format parsing (MD21) Legion+ versions (272+) use chunked format exclusively
Sourcepub fn detect_expansion(version: u32) -> M2Version
pub fn detect_expansion(version: u32) -> M2Version
Detect expansion from version number including Legion+ support Updated to handle versions 272+ as Legion+
Trait Implementations§
Source§impl Ord for M2Version
impl Ord for M2Version
Source§impl PartialOrd for M2Version
impl PartialOrd for M2Version
impl Copy for M2Version
impl Eq for M2Version
impl StructuralPartialEq for M2Version
Auto Trait Implementations§
impl Freeze for M2Version
impl RefUnwindSafe for M2Version
impl Send for M2Version
impl Sync for M2Version
impl Unpin for M2Version
impl UnwindSafe for M2Version
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more