pub struct IfpParser<'a> { /* private fields */ }
Expand description
The main parser for IFP files.
This struct holds the file buffer and provides the parse
method to
deserialize the IFP animation data.
Implementations§
Source§impl<'a> IfpParser<'a>
impl<'a> IfpParser<'a>
Sourcepub fn new(buffer: &'a [u8]) -> Self
pub fn new(buffer: &'a [u8]) -> Self
Creates a new IfpParser
instance with the given file buffer.
§Arguments
buffer
- A byte slice containing the raw IFP file data.
Sourcepub fn parse(&mut self) -> Result<RwIfp>
pub fn parse(&mut self) -> Result<RwIfp>
Parses the entire IFP file buffer.
This method detects the IFP version (ANP3
or ANPK
) based on the
file signature and calls the appropriate internal parsing method.
§Returns
A Result
containing the parsed RwIfp
data or an std::io::Error
if the file format is not supported or a parsing error occurs.
Auto Trait Implementations§
impl<'a> Freeze for IfpParser<'a>
impl<'a> RefUnwindSafe for IfpParser<'a>
impl<'a> Send for IfpParser<'a>
impl<'a> Sync for IfpParser<'a>
impl<'a> Unpin for IfpParser<'a>
impl<'a> UnwindSafe for IfpParser<'a>
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