pub fn contains_key<K>(&self, key: K) -> bool
    where
        K: AsEncodingAgnosticMetadataKey,
    {
        key.contains_key(self)
    }
Returns true if the map contains a value for the specified key. This
method works for both ascii and binary entries.

# Examples

```
# use tonic::metadata::*;
let mut map = MetadataMap::new();
assert!(!map.contains_key("x-host"));

map.append_bin("host-bin", MetadataValue::from_bytes(b"world"));
map.insert("x-host", "world".parse().unwrap());

// contains_key works for both Binary and Ascii keys:
assert!(map.contains_key("x-host"));
assert!(map.contains_key("host-bin"));

// contains_key returns false for invalid keys:
assert!(!map.contains_key("x{}host"));
```
tonic/src/metadata/map.rs