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.
Trait Implementations
impl PartialEq for GenericMetadata
[src]
fn eq(&self, __arg_0: &GenericMetadata) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &GenericMetadata) -> bool
This method tests for !=
.
impl Eq for GenericMetadata
[src]
impl Clone for GenericMetadata
[src]
fn clone(&self) -> GenericMetadata
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more