pub enum HashKind {
WadGame,
WadLcu,
BinEntryPath,
BinClassName,
BinFieldName,
BinHashValue,
Rst,
}Expand description
Each kind of hash handled by CDragon
See also bin::BinHashKind for a kind limited to bin hashes.
Variants§
WadGame
Hash for game WAD entries (.wad.client)
WadLcu
Hash for launcher WAD entries (.wad)
BinEntryPath
Hash of an bin entry path
BinClassName
Hash of a bin class name
BinFieldName
Hash of a bin field name
BinHashValue
Hash of a bin hash value
Rst
Hash of RST files (translation files)
Implementations§
Source§impl HashKind
impl HashKind
Sourcepub fn mapping_path(&self) -> &'static str
pub fn mapping_path(&self) -> &'static str
Return filename used by CDragon to store the mapping this kind of hash
use cdragon_hashes::HashKind;
assert_eq!(HashKind::WadLcu.mapping_path(), "hashes.lcu.txt");
assert_eq!(HashKind::BinEntryPath.mapping_path(), "hashes.binentries.txt");Sourcepub fn from_wad_path<P: AsRef<Path>>(path: P) -> Option<Self>
pub fn from_wad_path<P: AsRef<Path>>(path: P) -> Option<Self>
Return WAD hash kind from a WAD path
The path is assumed to be a “regular” WAD path that follows Riot conventions.
use cdragon_hashes::HashKind;
assert_eq!(HashKind::from_wad_path("Global.wad.client"), Some(HashKind::WadGame));
assert_eq!(HashKind::from_wad_path("assets.wad"), Some(HashKind::WadLcu));
assert_eq!(HashKind::from_wad_path("unknown"), None);Trait Implementations§
Source§impl From<BinHashKind> for HashKind
impl From<BinHashKind> for HashKind
Source§fn from(val: BinHashKind) -> Self
fn from(val: BinHashKind) -> Self
Converts to this type from the input type.
impl Copy for HashKind
impl Eq for HashKind
impl StructuralPartialEq for HashKind
Auto Trait Implementations§
impl Freeze for HashKind
impl RefUnwindSafe for HashKind
impl Send for HashKind
impl Sync for HashKind
impl Unpin for HashKind
impl UnwindSafe for HashKind
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