pub struct FormatDetector;Expand description
Format detection utilities
Implementations§
Source§impl FormatDetector
impl FormatDetector
Sourcepub fn detect_from_content(data: &[u8]) -> Result<DataFormat>
pub fn detect_from_content(data: &[u8]) -> Result<DataFormat>
Detect format from file content
Sourcepub fn detect_from_file(path: &Path) -> Result<DataFormat>
pub fn detect_from_file(path: &Path) -> Result<DataFormat>
Detect format from file path and content
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§
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