Function compact_media_type_for
pub fn compact_media_type_for(plain: &str) -> Option<&'static str>Expand description
The compact type of a plain payload type: application/cbor,
application/json or application/cbor-seq. Anything else has none.
use cratestack_core::compact::{COMPACT_CBOR, compact_media_type_for};
assert_eq!(compact_media_type_for("application/cbor"), Some(COMPACT_CBOR));
assert_eq!(compact_media_type_for("text/plain"), None);