pub struct FileTypeDetector;
Expand description
Main file type detector implementing ExifTool’s detection algorithm
Implementations§
Source§impl FileTypeDetector
impl FileTypeDetector
Sourcepub fn detect_file_type<R: Read + Seek>(
&self,
path: &Path,
reader: &mut R,
) -> Result<FileTypeDetectionResult, FileDetectionError>
pub fn detect_file_type<R: Read + Seek>( &self, path: &Path, reader: &mut R, ) -> Result<FileTypeDetectionResult, FileDetectionError>
Detect file type from path and file content
Implements ExifTool’s detection flow from ExifTool.pm:2913-2999
Sourcepub fn build_result(
&self,
file_type: &str,
path: &Path,
) -> Result<FileTypeDetectionResult, FileDetectionError>
pub fn build_result( &self, file_type: &str, path: &Path, ) -> Result<FileTypeDetectionResult, FileDetectionError>
Build final detection result from file type
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FileTypeDetector
impl RefUnwindSafe for FileTypeDetector
impl Send for FileTypeDetector
impl Sync for FileTypeDetector
impl Unpin for FileTypeDetector
impl UnwindSafe for FileTypeDetector
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