Home
last modified time | relevance | path

Searched refs:value (Results 1 – 25 of 34) sorted by relevance

12

/tonic/tonic/src/metadata/
H A Dencoding.rs23 fn is_empty(value: &[u8]) -> bool; in is_empty()
81 fn is_empty(value: &[u8]) -> bool { in is_empty()
82 value.is_empty() in is_empty()
94 HeaderValue::from_static(value) in from_static()
98 Ok(Bytes::copy_from_slice(value)) in decode()
110 fmt::Debug::fmt(value, f) in fmt()
121 fn is_empty(value: &[u8]) -> bool { in is_empty()
122 for c in value { in is_empty()
137 Self::from_bytes(value.as_ref()) in from_shared()
153 .decode(value) in decode()
[all …]
H A Dmod.rs6 mod value; module
30 pub use self::value::AsciiMetadataValue;
31 pub use self::value::BinaryMetadataValue;
32 pub use self::value::MetadataValue;
46 pub use super::value::ToStrError;
H A Dmap.rs9 use super::value::MetadataValue;
1110 key.append(self, value) in append()
1151 key.append(self, value) in append_bin()
1240 let (name, value) = item; in next()
1267 let (name, value) = item; in next()
1332 let (name, value) = item; in next()
1353 let (name, value) = item; in next()
1791 self.inner.append(value.inner) in append()
2669 for value in map.values() { in test_values_categorizes_ascii_entries()
2670 if let ValueRef::Ascii(value) = value { in test_values_categorizes_ascii_entries()
[all …]
H A Dvalue.rs205 inner: value, in unchecked_from_header_value()
257 inner: value, in try_from()
312 inner: value, in try_from()
575 inner: value, in from_str()
796 for &(value, expected) in cases { in test_debug()
899 fn hash(value: Amv) -> u64 { in test_ascii_value_hash()
901 value.hash(&mut hasher); in test_ascii_value_hash()
922 fn hash(value: Bmv) -> u64 { in test_valid_binary_value_hash()
924 value.hash(&mut hasher); in test_valid_binary_value_hash()
944 fn hash(value: Bmv) -> u64 { in test_invalid_binary_value_hash()
[all …]
/tonic/tonic-types/src/richer_error/std_messages/
H A Dprec_failure.rs44 r#type: value.r#type, in from()
45 subject: value.subject, in from()
46 description: value.description, in from()
52 fn from(value: PreconditionViolation) -> Self { in from()
54 r#type: value.r#type, in from()
55 subject: value.subject, in from()
56 description: value.description, in from()
128 value: detail_data.encode_to_vec(), in into_any()
142 let buf: &[u8] = &any.value; in from_any_ref()
150 fn from(value: pb::PreconditionFailure) -> Self { in from()
[all …]
H A Dhelp.rs29 fn from(value: pb::help::Link) -> Self { in from()
31 description: value.description, in from()
32 url: value.url, in from()
38 fn from(value: HelpLink) -> Self { in from()
40 description: value.description, in from()
41 url: value.url, in from()
104 value: detail_data.encode_to_vec(), in into_any()
118 let buf: &[u8] = &any.value; in from_any_ref()
126 fn from(value: pb::Help) -> Self { in from()
128 links: value.links.into_iter().map(Into::into).collect(), in from()
[all …]
H A Dbad_request.rs32 fn from(value: pb::bad_request::FieldViolation) -> Self { in from()
34 field: value.field, in from()
35 description: value.description, in from()
41 fn from(value: FieldViolation) -> Self { in from()
43 field: value.field, in from()
44 description: value.description, in from()
108 value: detail_data.encode_to_vec(), in into_any()
122 let buf: &[u8] = &any.value; in from_any_ref()
130 fn from(value: pb::BadRequest) -> Self { in from()
132 field_violations: value.field_violations.into_iter().map(Into::into).collect(), in from()
[all …]
H A Dquota_failure.rs30 fn from(value: pb::quota_failure::Violation) -> Self { in from()
32 subject: value.subject, in from()
33 description: value.description, in from()
39 fn from(value: QuotaViolation) -> Self { in from()
41 subject: value.subject, in from()
42 description: value.description, in from()
105 value: detail_data.encode_to_vec(), in into_any()
119 let buf: &[u8] = &any.value; in from_any_ref()
127 fn from(value: pb::QuotaFailure) -> Self { in from()
129 violations: value.violations.into_iter().map(Into::into).collect(), in from()
[all …]
H A Dretry_info.rs61 value: detail_data.encode_to_vec(), in into_any()
75 let buf: &[u8] = &any.value; in from_any_ref()
98 fn from(value: RetryInfo) -> Self { in from()
99 let retry_delay = match value.retry_delay { in from()
H A Drequest_info.rs49 value: detail_data.encode_to_vec(), in into_any()
63 let buf: &[u8] = &any.value; in from_any_ref()
H A Dloc_message.rs50 value: detail_data.encode_to_vec(), in into_any()
64 let buf: &[u8] = &any.value; in from_any_ref()
H A Ddebug_info.rs46 value: detail_data.encode_to_vec(), in into_any()
60 let buf: &[u8] = &any.value; in from_any_ref()
H A Dresource_info.rs62 value: detail_data.encode_to_vec(), in into_any()
76 let buf: &[u8] = &any.value; in from_any_ref()
H A Derror_info.rs62 value: detail_data.encode_to_vec(), in into_any()
76 let buf: &[u8] = &any.value; in from_any_ref()
/tonic/tonic/src/
H A Drequest.rs294 let value: MetadataValue<_> = duration_to_grpc_timeout(deadline).parse().unwrap(); in set_timeout() localVariable
296 .insert(crate::metadata::GRPC_TIMEOUT_HEADER, value); in set_timeout()
407 let value = convert(duration).into(); in duration_to_grpc_timeout() localVariable
408 if value > max_size { in duration_to_grpc_timeout()
411 Some(format!("{}{}", value, unit)) in duration_to_grpc_timeout()
468 let value = duration_to_grpc_timeout(timeout); in duration_to_grpc_timeout_less_than_second() localVariable
469 assert_eq!(value, format!("{}u", timeout.as_micros())); in duration_to_grpc_timeout_less_than_second()
475 let value = duration_to_grpc_timeout(timeout); in duration_to_grpc_timeout_more_than_second() localVariable
476 assert_eq!(value, format!("{}u", timeout.as_micros())); in duration_to_grpc_timeout_more_than_second()
482 let value = duration_to_grpc_timeout(one_hour); in duration_to_grpc_timeout_a_very_long_time() localVariable
[all …]
/tonic/tonic/src/codec/
H A Dcompression.rs49 let mut value = BytesMut::new(); in into_accept_encoding_header_value() localVariable
51 value.put_slice(encoding.as_str().as_bytes()); in into_accept_encoding_header_value()
52 value.put_u8(b','); in into_accept_encoding_header_value()
55 if value.is_empty() { in into_accept_encoding_header_value()
59 value.put_slice(b"identity"); in into_accept_encoding_header_value()
60 Some(http::HeaderValue::from_maybe_shared(value).unwrap()) in into_accept_encoding_header_value()
119 split_by_comma(header_value_str).find_map(|value| match value { in from_accept_encoding_header()
/tonic/tests/integration_tests/tests/
H A Dextensions.rs28 let value = req.extensions().get::<ExtensionValue>().unwrap(); in setting_extension_from_interceptor() localVariable
29 assert_eq!(value.0, 42); in setting_extension_from_interceptor()
78 let value = req.extensions().get::<ExtensionValue>().unwrap(); in setting_extension_from_tower() localVariable
79 assert_eq!(value.0, 42); in setting_extension_from_tower()
/tonic/tonic/src/transport/channel/service/
H A Duser_agent.rs16 .map(|value| { in new()
18 buf.extend(value.as_bytes()); in new()
/tonic/tests/wellknown-compiled/src/
H A Dlib.rs16 value: Vec::new(), in grok()
/tonic/tonic-web/src/
H A Dcall.rs367 fn from_header(value: Option<&HeaderValue>) -> Encoding { in from_header()
368 match value.and_then(|val| val.to_str().ok()) { in from_header()
381 trailers.iter().fold(Vec::new(), |mut acc, (key, value)| { in encode_trailers()
384 acc.put_slice(value.as_bytes()); in encode_trailers()
425 let value = s in decode_trailers_frame() localVariable
429 let value = value in decode_trailers_frame() localVariable
434 .unwrap_or(value); in decode_trailers_frame()
438 let header_value = HeaderValue::try_from(value) in decode_trailers_frame()
/tonic/examples/proto/googleapis/google/pubsub/v1/
H A Dpubsub.proto237 // must specify the same `ordering_key` value.
342 // the request; this value should be passed in a new
371 // the request; this value should be passed in a new
663 // For pull subscriptions, this value is used as the initial value for the ack
664 // deadline. To override this value for a given message, call
709 // value for `expiration_policy.ttl` is 1 day.
796 // If this parameter is 0, a default value of 5 is used.
894 // value of 1. The value is calculated at best effort and is approximate.
949 // the request; this value should be passed in a new
1125 // number of outstanding messages is less than this value. If the value is
[all …]
H A Dschema.proto105 // Default value. This value is unused.
156 // The default / unset value.
201 // The value returned by the last `ListSchemasResponse`; indicates that
213 // request; this value should be passed in a new `ListSchemasRequest`.
/tonic/tonic-reflection/src/server/
H A Dmod.rs229 for value in &en.value { in process_enum()
230 let value_name = extract_name(&enum_name, "enum value", value.name.as_ref())?; in process_enum()
/tonic/interop/proto/grpc/testing/
H A Dempty.proto21 // return value of a service API. For instance:
/tonic/tonic-types/proto/
H A Derror_details.proto114 // The reason of the error. This is a constant value that identifies the
124 // globally unique value that identifies the infrastructure. For Google API
131 // length. When identifying the current value of an exceeded limit, the units
132 // should be contained in the key, not the value. For example, rather than
173 // A path leading to a field in the request body. The value will be a

12