feat: Add TryFrom implementations for MetadataValue (#990)

Co-authored-by: Adam Chalmers <[email protected]>
This commit is contained in:
Adam Chalmers
2022-05-02 13:38:42 -04:00
committed by GitHub
co-authored by Adam Chalmers
parent 2112ecc426
commit edc5a0d88d
6 changed files with 184 additions and 35 deletions
+1 -1
View File
@@ -342,7 +342,7 @@ pub async fn unimplemented_service(
pub async fn custom_metadata(client: &mut TestClient, assertions: &mut Vec<TestAssertion>) {
let key1 = "x-grpc-test-echo-initial";
let value1 = MetadataValue::from_str("test_initial_metadata_value").unwrap();
let value1: MetadataValue<_> = "test_initial_metadata_value".parse().unwrap();
let key2 = "x-grpc-test-echo-trailing-bin";
let value2 = MetadataValue::from_bytes(&[0xab, 0xab, 0xab]);