pub struct DffParser<'a> { /* private fields */ }
Expand description
The main parser for DFF files.
This struct holds the file buffer and provides the parse
method to
deserialize the DFF data.
Implementations§
Source§impl<'a> DffParser<'a>
impl<'a> DffParser<'a>
Sourcepub fn new(buffer: &'a [u8]) -> Self
pub fn new(buffer: &'a [u8]) -> Self
Creates a new DffParser
instance with the given file buffer.
§Arguments
buffer
- A byte slice containing the raw DFF file data.
Sourcepub fn parse(&mut self) -> Result<RwDff>
pub fn parse(&mut self) -> Result<RwDff>
Parses the entire DFF file buffer.
This method iterates through the RenderWare sections in the file,
deserializing each part and assembling the final RwDff
struct.
§Returns
A Result
containing the parsed RwDff
data or an std::io::Error
if the parsing fails.
Auto Trait Implementations§
impl<'a> Freeze for DffParser<'a>
impl<'a> RefUnwindSafe for DffParser<'a>
impl<'a> Send for DffParser<'a>
impl<'a> Sync for DffParser<'a>
impl<'a> Unpin for DffParser<'a>
impl<'a> UnwindSafe for DffParser<'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