Module immeta::markers [] [src]

Contains metadata marker types.

Metadata markers is a convenient way to access metadata loading functions for particular image types. They are also integrated with GenericMetadata, providing a convenient syntax to downcast a GenericMetadata value to a specific metadata type.

Metadata marker types can be used directly, for example:

This example is not tested
use immeta::markers::Jpeg;

let metadata = Jpeg::load_from_file("kitty.jpg").unwrap();

They can also be used together with GenericMetadata:

This example is not tested
use immeta::markers::Jpeg;

let gmd = immeta::load_from_file("kitty.jpg").unwrap();
let jpeg_metadata: Jpeg::Metadata = gmd.into::<Jpeg>().unwrap();

Alternatively, you can use as_ref():

This example is not tested
let jpeg_metadata: &Jpeg::Metadata = gmd.as_ref::<Jpeg>().unwrap();

MetadataMarker::Metadata associated type always points to concrete metadata type from one of immeta::formats submodules.

Enums

Gif
Jpeg
Png
Webp

Traits

MetadataMarker

A marker trait for a specific metadata type.