actix_prost/
header.rs

1use crate::http_compatibility::from_actix_header;
2
3pub fn map_actix_headers(headers: &actix_http::header::HeaderMap) -> http::HeaderMap {
4    http::HeaderMap::from_iter(
5        headers
6            .iter()
7            .map(|(k, v)| from_actix_header((k.clone(), v.clone()))),
8    )
9}
10
11pub fn map_headers(headers: &actix_http::header::HeaderMap) -> tonic::metadata::MetadataMap {
12    tonic::metadata::MetadataMap::from_headers(map_actix_headers(headers))
13}