Enum immeta::GenericMetadata [] [src]

pub enum GenericMetadata {
    Png(Metadata),
    Gif(Metadata),
    Jpeg(Metadata),
    Webp(Metadata),
}

Represents metadata loaded from a file whose format was determined automatically.

Values of this type are obtained via immeta::load() function and its derivatives.

Variants

Png(Metadata)Gif(Metadata)Jpeg(Metadata)Webp(Metadata)

Methods

impl GenericMetadata
[src]

fn dimensions(&self) -> Dimensions

Returns image dimensions from the contained metadata.

fn mime_type(&self) -> &'static str

Returns a MIME type string for the image type of the contained metadata.

fn into<T: MetadataMarker>(self) -> Result<T::Metadata, GenericMetadata>

Attemts to convert this value to the specific metadata type by value.

This method is needed only to provide a convenient syntax and it is not necessary because one may just match on the GenericMetadata value.

fn as_ref<T: MetadataMarker>(&self) -> Option<&T::Metadata>

Attempts to convert this value to the sepcific metadata type by reference.

This method is needed only to provide a convenient syntax and it is not necessary because one may just match on the GenericMetadata value.