Trait sic_io::format::EncodingFormatByExtension[][src]

pub trait EncodingFormatByExtension {
    fn by_extension<P: AsRef<Path>>(
        &self,
        path: P
    ) -> Result<ImageOutputFormat, SicIoError>; }

Required methods

fn by_extension<P: AsRef<Path>>(
    &self,
    path: P
) -> Result<ImageOutputFormat, SicIoError>
[src]

Determine the encoding format based on the extension of a file path.

Loading content...

Implementors

impl EncodingFormatByExtension for DetermineEncodingFormat[src]

fn by_extension<P: AsRef<Path>>(
    &self,
    path: P
) -> Result<ImageOutputFormat, SicIoError>
[src]

Determines the encoding format based on the extension of the given path. If the path has no extension, it will return an error. The extension if existing is matched against the identifiers, which currently are the extensions used.

Loading content...