pub struct BlpParser { /* private fields */ }Expand description
Parser for BLP texture files
The Parser reads binary BLP files and converts them into the Texture structure. It can handle both BLP1 (Warcraft III) and BLP2 (World of Warcraft) variants. Parsing is non-throwing — issues are collected via hasIssues() / getIssues() and parse() returns std::nullopt on failure.
Uses the PImpl (Pointer to Implementation) idiom to hide implementation details.
Implementations§
Source§impl BlpParser
impl BlpParser
Sourcepub fn parse(&mut self, buffer: &[u8]) -> Option<Texture>
pub fn parse(&mut self, buffer: &[u8]) -> Option<Texture>
Parse a BLP file from memory buffer @param buffer Memory buffer containing BLP data @return Parsed texture data, or std::nullopt on failure @throws std::runtime_error If parsing fails in strict mode
Sourcepub fn has_issues(&self) -> bool
pub fn has_issues(&self) -> bool
Check if parsing encountered any issues @return True if there were warnings or recoverable errors
Trait Implementations§
impl Send for BlpParser
Auto Trait Implementations§
impl !Sync for BlpParser
impl Freeze for BlpParser
impl RefUnwindSafe for BlpParser
impl Unpin for BlpParser
impl UnsafeUnpin for BlpParser
impl UnwindSafe for BlpParser
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