MCPcopy Create free account
hub / github.com/apache/dubbo-rust / from_headers

Method from_headers

dubbo/src/invocation.rs:187–196  ·  view source on GitHub ↗
(headers: http::HeaderMap)

Source from the content-addressed store, hash-verified

185 }
186
187 pub fn from_headers(headers: http::HeaderMap) -> Self {
188 let mut h: HashMap<String, String> = HashMap::new();
189 for (k, v) in headers.into_iter() {
190 if let Some(name) = k {
191 h.insert(name.to_string(), v.to_str().unwrap().to_string());
192 }
193 }
194
195 Metadata { inner: h }
196 }
197
198 pub fn into_headers(&self) -> http::HeaderMap {
199 let mut header = http::HeaderMap::new();

Callers

nothing calls this directly

Calls 1

insertMethod · 0.80

Tested by

no test coverage detected