pub struct FormatDetector;Expand description
File format detection using magic numbers and content analysis
Implementations§
Source§impl FormatDetector
impl FormatDetector
Sourcepub fn detect_from_bytes(&self, bytes: &[u8]) -> FileFormat
pub fn detect_from_bytes(&self, bytes: &[u8]) -> FileFormat
Detect file format from file content (magic numbers)
Sourcepub fn detect_from_extension<P: AsRef<Path>>(&self, path: P) -> FileFormat
pub fn detect_from_extension<P: AsRef<Path>>(&self, path: P) -> FileFormat
Detect file format from file extension (fallback method)
Sourcepub fn is_supported(&self, format: FileFormat) -> bool
pub fn is_supported(&self, format: FileFormat) -> bool
Check if a format is supported for processing
Trait Implementations§
Source§impl Debug for FormatDetector
impl Debug for FormatDetector
Auto Trait Implementations§
impl Freeze for FormatDetector
impl RefUnwindSafe for FormatDetector
impl Send for FormatDetector
impl Sync for FormatDetector
impl Unpin for FormatDetector
impl UnwindSafe for FormatDetector
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more