pub struct AnimFormatDetector;Expand description
ANIM format detector
Implementations§
Source§impl AnimFormatDetector
impl AnimFormatDetector
Sourcepub fn detect_format<R: Read + Seek>(reader: &mut R) -> Result<AnimFormat>
pub fn detect_format<R: Read + Seek>(reader: &mut R) -> Result<AnimFormat>
Detect ANIM format by examining file content
This method examines the first 4 bytes of the file to detect the format:
- If they match “MAOF”, it’s a modern format file
- Otherwise, it’s assumed to be a legacy format file
The reader position is restored after detection.
§Errors
Returns an error if:
- The file is too small to read the magic bytes
- I/O errors occur during detection
Sourcepub fn detect_format_by_version(version: M2Version) -> AnimFormat
pub fn detect_format_by_version(version: M2Version) -> AnimFormat
Detect format based on M2 version (heuristic approach)
Auto Trait Implementations§
impl Freeze for AnimFormatDetector
impl RefUnwindSafe for AnimFormatDetector
impl Send for AnimFormatDetector
impl Sync for AnimFormatDetector
impl Unpin for AnimFormatDetector
impl UnsafeUnpin for AnimFormatDetector
impl UnwindSafe for AnimFormatDetector
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> 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