c2pa-rs
c2pa-rs copied to clipboard
Create a `Format` enum for file format/mime type
It's not clear in the API which file formats/mime types are supported. We also often end up string matching when dealing with different file formats. I think we can make some big improvements by introducing a Format enum similar to image::ImageFormat.
We can provide methods such as:
c2pa::format_from_path->Format::from_pathFormat::from_extensionFormat::from_mime_typeFormat::mime_typeFormat::formatFormat::extensionsFormat::can_readFormat::can_write
Source: https://github.com/contentauth/c2pa-rs/pull/1260#discussion_r2229607467