[][src]Struct naut_io::format::DetermineEncodingFormat

pub struct DetermineEncodingFormat {
    pub pnm_sample_encoding: Option<SampleEncoding>,
    pub jpeg_quality: Option<JPEGQuality>,
}

Fields

pnm_sample_encoding: Option<SampleEncoding>jpeg_quality: Option<JPEGQuality>

Trait Implementations

impl Default for DetermineEncodingFormat[src]

impl EncodingFormatByExtension for DetermineEncodingFormat[src]

pub 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.

impl EncodingFormatByIdentifier for DetermineEncodingFormat[src]

pub fn by_identifier(
    &self,
    identifier: &str
) -> Result<ImageOutputFormat, SicIoError>
[src]

Determines an image output format based on a given &str identifier. Identifiers are based on common output file extensions.

impl EncodingFormatJPEGQuality for DetermineEncodingFormat[src]

impl EncodingFormatPNMSampleEncoding for DetermineEncodingFormat[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.