pub enum M2Version {
Classic,
TBC,
WotLK,
Cataclysm,
MoP,
WoD,
Legion,
BfA,
Shadowlands,
Dragonflight,
TheWarWithin,
}Expand description
M2 format versions across WoW expansions
Variants§
Classic
Classic/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
Sourcepub fn to_header_version(&self) -> u32
pub fn to_header_version(&self) -> u32
Convert M2Version enum to header version number
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
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
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<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>
Converts
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>
Converts
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