Parse and handle media types in Elm.
{ type_ : Type
, registrationTree : Maybe String
, subtype : String
, suffix : Maybe String
, parameters : Dict String String
}
A media type.
Media type types.
I didn't pick the name...
Based on the list from https://en.wikipedia.org/w/index.php?title=Media_type&oldid=881155761#Naming
fromString : String -> Maybe MediaType
Attempt to parse a string as a media type.
toString : MediaType -> String
Convert a media type back into a string.
parser : Parser MediaType
Media types can be a part of another data schema, like the data URI scheme, so it can be helpful to access the internal parser.