| /tonic/tonic/src/metadata/ |
| H A D | encoding.rs | 3 use http::header::HeaderValue; 18 use http::header::HeaderValue; 32 fn from_static(value: &'static str) -> HeaderValue; in from_static() argument 38 fn equals(a: &HeaderValue, b: &[u8]) -> bool; in equals() argument 41 fn values_equal(a: &HeaderValue, b: &HeaderValue) -> bool; in values_equal() argument 93 fn from_static(value: &'static str) -> HeaderValue { in from_static() argument 94 HeaderValue::from_static(value) in from_static() 101 fn equals(a: &HeaderValue, b: &[u8]) -> bool { in equals() argument 105 fn values_equal(a: &HeaderValue, b: &HeaderValue) -> bool { in values_equal() argument 158 fn equals(a: &HeaderValue, b: &[u8]) -> bool { in equals() argument [all …]
|
| H A D | mod.rs | 33 use http::HeaderValue; 38 pub const GRPC_CONTENT_TYPE: HeaderValue = HeaderValue::from_static("application/grpc");
|
| H A D | map.rs | 59 inner: http::header::Iter<'a, http::header::HeaderValue>, 88 inner: http::header::IterMut<'a, http::header::HeaderValue>, 94 inner: http::header::ValueDrain<'a, http::header::HeaderValue>, 104 inner: http::header::Keys<'a, http::header::HeaderValue>, 125 inner: http::header::Iter<'a, http::header::HeaderValue>, 145 inner: http::header::IterMut<'a, http::header::HeaderValue>, 168 inner: http::header::ValueIterMut<'a, http::header::HeaderValue>, 198 inner: http::header::VacantEntry<'a, http::header::HeaderValue>, 2118 use http::header::{Entry, GetAll, HeaderValue}; 2180 ) -> Result<Entry<'_, HeaderValue>, InvalidMetadataKey> { in entry() argument [all …]
|
| H A D | value.rs | 7 use http::header::HeaderValue; 25 pub(crate) inner: HeaderValue, 89 inner: HeaderValue::from_maybe_shared_unchecked(src), in from_shared_unchecked() 203 pub(crate) fn unchecked_from_header_value(value: HeaderValue) -> Self { in unchecked_from_header_value() 214 pub(crate) fn unchecked_from_header_value_ref(header_value: &HeaderValue) -> &Self { in unchecked_from_header_value_ref() 215 unsafe { &*(header_value as *const HeaderValue as *const Self) } in unchecked_from_header_value_ref() constant 222 pub(crate) fn unchecked_from_mut_header_value_ref(header_value: &mut HeaderValue) -> &mut Self { in unchecked_from_mut_header_value_ref() 223 unsafe { &mut *(header_value as *mut HeaderValue as *mut Self) } in unchecked_from_mut_header_value_ref() 497 inner: HeaderValue::from(num), 573 HeaderValue::from_str(s) in from_str()
|
| /tonic/tonic/src/transport/channel/service/ |
| H A D | user_agent.rs | 1 use http::{header::USER_AGENT, HeaderValue, Request}; 10 user_agent: HeaderValue, 14 pub(crate) fn new(inner: T, user_agent: Option<HeaderValue>) -> Self { in new() 21 HeaderValue::from_bytes(&buf).expect("user-agent should be valid") in new() 23 .unwrap_or_else(|| HeaderValue::from_static(TONIC_USER_AGENT)); in new() 59 HeaderValue::from_static(TONIC_USER_AGENT) in sets_default_if_no_custom_user_agent() 66 UserAgent::new(Svc, Some(HeaderValue::from_static("Greeter 1.1"))).user_agent, in prepends_custom_user_agent_to_default() 67 HeaderValue::from_str(&format!("Greeter 1.1 {}", TONIC_USER_AGENT)).unwrap() in prepends_custom_user_agent_to_default()
|
| /tonic/tonic/src/codec/ |
| H A D | compression.rs | 48 pub(crate) fn into_accept_encoding_header_value(self) -> Option<http::HeaderValue> { in into_accept_encoding_header_value() argument 60 Some(http::HeaderValue::from_maybe_shared(value).unwrap()) in into_accept_encoding_header_value() 194 pub(crate) fn into_header_value(self) -> http::HeaderValue { in into_header_value() argument 195 http::HeaderValue::from_static(self.as_str()) in into_header_value() 315 use http::HeaderValue; 329 const GZIP: HeaderValue = HeaderValue::from_static("gzip,identity"); in convert_gzip_into_header_value() 347 const ZSTD: HeaderValue = HeaderValue::from_static("zstd,identity"); in convert_zstd_into_header_value() 375 HeaderValue::from_static("gzip,deflate,zstd,identity"), in convert_compression_encodings_into_header_value() 388 HeaderValue::from_static("zstd,deflate,gzip,identity"), in convert_compression_encodings_into_header_value()
|
| /tonic/tonic/src/ |
| H A D | status.rs | 6 header::{HeaderMap, HeaderValue}, 818 fn to_header_value(self) -> HeaderValue { in to_header_value() argument 820 Code::Ok => HeaderValue::from_static("0"), in to_header_value() 821 Code::Cancelled => HeaderValue::from_static("1"), in to_header_value() 822 Code::Unknown => HeaderValue::from_static("2"), in to_header_value() 825 Code::NotFound => HeaderValue::from_static("5"), in to_header_value() 830 Code::Aborted => HeaderValue::from_static("10"), in to_header_value() 831 Code::OutOfRange => HeaderValue::from_static("11"), in to_header_value() 833 Code::Internal => HeaderValue::from_static("13"), in to_header_value() 834 Code::Unavailable => HeaderValue::from_static("14"), in to_header_value() [all …]
|
| /tonic/tonic/src/transport/service/ |
| H A D | grpc_timeout.rs | 2 use http::{HeaderMap, HeaderValue, Request}; 104 headers: &HeaderMap<HeaderValue>, in try_parse_grpc_timeout() argument 105 ) -> Result<Option<Duration>, &HeaderValue> { in try_parse_grpc_timeout() argument 155 fn setup_map_try_parse(val: Option<&str>) -> Result<Option<Duration>, HeaderValue> { in setup_map_try_parse() argument 158 let hv = HeaderValue::from_str(v).unwrap(); in setup_map_try_parse()
|
| /tonic/tests/integration_tests/tests/ |
| H A D | client_layer.rs | 1 use http::{header::HeaderName, HeaderValue}; 52 HeaderValue::from_static("test-header"), in connect_supports_standard_tower_layers()
|
| /tonic/tonic-web/src/ |
| H A D | service.rs | 6 use http::{header, HeaderMap, HeaderValue, Method, Request, Response, StatusCode, Version}; 217 .insert(header::TE, HeaderValue::from_static("trailers")); in coerce_request() 221 HeaderValue::from_static("identity,deflate,gzip"), in coerce_request() 238 HeaderValue::from_static(encoding.to_content_type()), in coerce_response() 360 .insert(CONTENT_TYPE, HeaderValue::from_static(ct)); in grpc_web_content_types() 433 HeaderValue::from_maybe_shared(format!("application/{}", variant)).unwrap(), in content_type_variants()
|
| H A D | call.rs | 7 use http::{header, HeaderMap, HeaderName, HeaderValue}; 367 fn from_header(value: Option<&HeaderValue>) -> Encoding { in from_header() 438 let header_value = HeaderValue::try_from(value) in decode_trailers_frame()
|
| /tonic/tonic/src/transport/channel/ |
| H A D | endpoint.rs | 9 use http::{uri::Uri, HeaderValue}; 22 pub(crate) user_agent: Option<HeaderValue>, 100 T: TryInto<HeaderValue>, in user_agent() argument
|
| /tonic/tonic/src/client/ |
| H A D | grpc.rs | 12 header::{HeaderValue, CONTENT_TYPE, TE}, 400 .insert(TE, HeaderValue::from_static("trailers")); in prepare_request()
|
| /tonic/examples/src/h2c/ |
| H A D | server.rs | 120 http::header::HeaderValue::from_static("h2c"), in call()
|