Function aspasia::detect_format_by_content_with_encoding
source · pub fn detect_format_by_content_with_encoding(
path: impl AsRef<Path>,
encoding: Option<&'static Encoding>
) -> Result<Format, Error>
Expand description
Attempt to detect subtitle format from file contents, using specified encoding to read file
Errors
- Returns
Error::FileIoError
if an error results while attempting to open the file for content detection. - Returns
Error::FormatUnknownError
if unable to conclusively determine a single format.