1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Contains data structures and utilities for handling gRPC custom metadata.

mod encoding;
mod key;
mod map;
mod value;

pub use self::encoding::Ascii;
pub use self::encoding::Binary;
pub use self::key::AsciiMetadataKey;
pub use self::key::BinaryMetadataKey;
pub use self::key::MetadataKey;
pub use self::map::Entry;
pub use self::map::GetAll;
pub use self::map::Iter;
pub use self::map::IterMut;
pub use self::map::KeyAndMutValueRef;
pub use self::map::KeyAndValueRef;
pub use self::map::KeyRef;
pub use self::map::Keys;
pub use self::map::MetadataMap;
pub use self::map::OccupiedEntry;
pub use self::map::VacantEntry;
pub use self::map::ValueDrain;
pub use self::map::ValueIter;
pub use self::map::ValueRef;
pub use self::map::ValueRefMut;
pub use self::map::Values;
pub use self::map::ValuesMut;
pub use self::value::AsciiMetadataValue;
pub use self::value::BinaryMetadataValue;
pub use self::value::MetadataValue;
use http::HeaderValue;

pub(crate) use self::map::GRPC_TIMEOUT_HEADER;

/// HTTP Header `content-type` value for gRPC calls.
pub const GRPC_CONTENT_TYPE: HeaderValue = HeaderValue::from_static("application/grpc");

/// The metadata::errors module contains types for errors that can occur
/// while handling gRPC custom metadata.
pub mod errors {
    pub use super::encoding::InvalidMetadataValue;
    pub use super::encoding::InvalidMetadataValueBytes;
    pub use super::key::InvalidMetadataKey;
    pub use super::value::ToStrError;
}