Home
last modified time | relevance | path

Searched refs:usize (Results 1 – 25 of 38) sorted by relevance

12

/tonic/tonic/src/codec/
H A Dmod.rs27 const DEFAULT_CODEC_BUFFER_SIZE: usize = 8 * 1024;
28 const DEFAULT_YIELD_THRESHOLD: usize = 32 * 1024;
69 buffer_size: usize,
70 yield_threshold: usize,
75 pub fn new(buffer_size: usize, yield_threshold: usize) -> Self { in new() argument
93 const HEADER_SIZE: usize =
100 const DEFAULT_MAX_RECV_MESSAGE_SIZE: usize = 4 * 1024 * 1024;
101 const DEFAULT_MAX_SEND_MESSAGE_SIZE: usize = usize::MAX;
H A Dbuffer.rs8 len: usize,
18 pub(crate) fn new(buf: &'a mut BytesMut, len: usize) -> Self { in new()
25 fn remaining(&self) -> usize { in remaining() argument
41 fn advance(&mut self, cnt: usize) { in advance() argument
48 fn copy_to_bytes(&mut self, len: usize) -> Bytes { in copy_to_bytes()
68 pub fn reserve(&mut self, additional: usize) { in reserve() argument
75 fn remaining_mut(&self) -> usize { in remaining_mut() argument
80 unsafe fn advance_mut(&mut self, cnt: usize) { in advance_mut() argument
103 fn put_bytes(&mut self, val: u8, cnt: usize) { in put_bytes() argument
H A Dprost.rs162 const LEN: usize = 10000;
164 const MAX_MESSAGE_SIZE: usize = 2 * 1024 * 1024;
285 let msg = vec![0u8; u32::MAX as usize + 1]; in encode_too_big()
295 Some(usize::MAX), in encode_too_big()
363 partial_len: usize,
366 count: usize,
370 pub(super) fn new(b: &[u8], partial_len: usize, count: usize) -> Self { in new() argument
H A Dencode.rs28 max_message_size: Option<usize>,
40 max_message_size: Option<usize>, in new() argument
138 max_message_size: Option<usize>, in encode_item() argument
183 max_message_size: Option<usize>, in finish_encoding() argument
195 if len > u32::MAX as usize { in finish_encoding()
238 max_message_size: Option<usize>, in new_client() argument
263 max_message_size: Option<usize>, in new_server() argument
H A Ddecode.rs34 max_message_size: Option<usize>,
44 len: usize,
64 max_message_size: Option<usize>, in new_response() argument
96 max_message_size: Option<usize>, in new_request() argument
117 max_message_size: Option<usize>, in new() argument
185 let len = self.buf.get_u32() as usize; in decode_chunk()
/tonic/tests/integration_tests/tests/
H A Dmax_message_size.rs71 server_recv_max: Some(usize::MAX), in max_message_send_size()
77 server_recv_max: Some(usize::MAX), in max_message_send_size()
84 server_recv_max: Some(usize::MAX), in max_message_send_size()
96 client_recv_max: Some(usize::MAX), in max_message_send_size()
102 client_recv_max: Some(usize::MAX), in max_message_send_size()
263 client_blob_size: usize,
264 server_blob_size: usize,
265 client_recv_max: Option<usize>,
266 server_recv_max: Option<usize>,
267 client_send_max: Option<usize>,
[all …]
/tonic/tonic/benches/
H A Ddecode.rs46 chunk_size: usize,
50 fn new(data: Bytes, chunk_size: usize) -> Self { in new()
54 fn len(&self) -> usize { in len() argument
93 message_size: usize,
97 fn new(message_size: usize) -> Self { in new()
113 fn make_payload(message_length: usize, message_count: usize) -> Bytes { in make_payload() argument
/tonic/examples/src/streaming/
H A Dclient.rs12 tokio_stream::iter(1..usize::MAX).map(|i| EchoRequest { in echo_requests_iter()
17 async fn streaming_echo(client: &mut EchoClient<Channel>, num: usize) { in streaming_echo() argument
34 async fn bidirectional_streaming_echo(client: &mut EchoClient<Channel>, num: usize) { in bidirectional_streaming_echo() argument
/tonic/tonic/src/server/
H A Dgrpc.rs41 max_decoding_message_size: Option<usize>,
43 max_encoding_message_size: Option<usize>,
149 pub fn max_decoding_message_size(mut self, limit: usize) -> Self { in max_decoding_message_size()
179 pub fn max_encoding_message_size(mut self, limit: usize) -> Self { in max_encoding_message_size()
205 max_decoding_message_size: Option<usize>, in apply_max_message_size_config() argument
206 max_encoding_message_size: Option<usize>, in apply_max_message_size_config() argument
424 max_message_size: Option<usize>, in map_response() argument
/tonic/tests/integration_tests/src/
H A Dlib.rs41 ) -> Poll<std::io::Result<usize>> { in poll_write() argument
60 ) -> Poll<Result<usize, std::io::Error>> { in poll_write_vectored() argument
/tonic/tonic/src/transport/channel/service/
H A Dio.rs44 ) -> Poll<io::Result<usize>> { in poll_write() argument
60 ) -> Poll<Result<usize, io::Error>> { in poll_write_vectored() argument
/tonic/tonic/benches-disabled/benchmarks/
H A Dutils.rs4 pub fn generate_rnd_string(string_size: usize) -> Result<String, Box<dyn std::error::Error>> { in generate_rnd_string()
/tonic/tonic/src/transport/channel/
H A Dmod.rs40 const DEFAULT_BUFFER_SIZE: usize = 1024;
122 pub fn balance_channel<K>(capacity: usize) -> (Self, Sender<Change<K, Endpoint>>) in balance_channel()
135 capacity: usize, in balance_channel_with_executor() argument
190 pub(crate) fn balance<D, E>(discover: D, buffer_size: usize, executor: E) -> Self in balance() argument
H A Dendpoint.rs24 pub(crate) concurrency_limit: Option<usize>,
28 pub(crate) buffer_size: Option<usize>,
192 pub fn concurrency_limit(self, limit: usize) -> Self { in concurrency_limit()
240 pub fn buffer_size(self, sz: impl Into<Option<usize>>) -> Self { in buffer_size()
/tonic/tonic-health/src/generated/
H A Dgrpc_health_v1.rs126 pub fn max_decoding_message_size(mut self, limit: usize) -> Self { in max_decoding_message_size()
134 pub fn max_encoding_message_size(mut self, limit: usize) -> Self { in max_encoding_message_size()
258 max_decoding_message_size: Option<usize>,
259 max_encoding_message_size: Option<usize>,
299 pub fn max_decoding_message_size(mut self, limit: usize) -> Self { in max_decoding_message_size()
307 pub fn max_encoding_message_size(mut self, limit: usize) -> Self { in max_encoding_message_size()
/tonic/tonic/src/metadata/
H A Dmap.rs321 pub fn len(&self) -> usize { in len() argument
347 pub fn keys_len(&self) -> usize { in keys_len() argument
404 pub fn capacity(&self) -> usize { in capacity() argument
429 pub fn reserve(&mut self, additional: usize) { in reserve() argument
1255 fn size_hint(&self) -> (usize, Option<usize>) { in size_hint() argument
1282 fn size_hint(&self) -> (usize, Option<usize>) { in size_hint() argument
1298 fn size_hint(&self) -> (usize, Option<usize>) { in size_hint() argument
1318 fn size_hint(&self) -> (usize, Option<usize>) { in size_hint() argument
1341 fn size_hint(&self) -> (usize, Option<usize>) { in size_hint() argument
1362 fn size_hint(&self) -> (usize, Option<usize>) { in size_hint() argument
[all …]
/tonic/tonic-reflection/src/generated/
H A Dgrpc_reflection_v1.rs215 pub fn max_decoding_message_size(mut self, limit: usize) -> Self { in max_decoding_message_size()
223 pub fn max_encoding_message_size(mut self, limit: usize) -> Self { in max_encoding_message_size()
299 max_decoding_message_size: Option<usize>,
300 max_encoding_message_size: Option<usize>,
340 pub fn max_decoding_message_size(mut self, limit: usize) -> Self { in max_decoding_message_size()
348 pub fn max_encoding_message_size(mut self, limit: usize) -> Self { in max_encoding_message_size()
H A Dgrpc_reflection_v1alpha.rs215 pub fn max_decoding_message_size(mut self, limit: usize) -> Self { in max_decoding_message_size()
223 pub fn max_encoding_message_size(mut self, limit: usize) -> Self { in max_encoding_message_size()
299 max_decoding_message_size: Option<usize>,
300 max_encoding_message_size: Option<usize>,
340 pub fn max_decoding_message_size(mut self, limit: usize) -> Self { in max_decoding_message_size()
348 pub fn max_encoding_message_size(mut self, limit: usize) -> Self { in max_encoding_message_size()
/tonic/interop/src/
H A Dlib.rs18 pub fn client_payload(size: usize) -> pb::Payload { in client_payload()
25 pub fn server_payload(size: usize) -> pb::Payload { in server_payload()
H A Dclient.rs13 const LARGE_REQ_SIZE: usize = 271_828;
64 payload_len == LARGE_RSP_SIZE as usize, in large_unary()
86 payload: Some(crate::client_payload(*len as usize)), in client_streaming()
402 fn make_ping_pong_request(idx: usize) -> StreamingOutputCallRequest { in make_ping_pong_request()
407 payload: Some(crate::client_payload(req_len as usize)), in make_ping_pong_request()
H A Dserver.rs40 req.response_size as usize in unary_call()
76 let payload = crate::server_payload(param.size as usize); in streaming_output_call()
131 let payload = crate::server_payload(param.size as usize); in full_duplex_call()
/tonic/tonic-web/src/
H A Dcall.rs16 const GRPC_HEADER_SIZE: usize = 1 + 4;
38 const BUFFER_SIZE: usize = 8 * 1024;
40 const FRAME_HEADER_SIZE: usize = 5;
140 fn max_decodable(&self) -> usize { in max_decodable() argument
449 assert!(len <= u32::MAX as usize); in make_trailers_frame()
489 len += msg_len as usize + 4 + 1; in find_trailers()
503 Trailer(usize),
505 Done(usize),
/tonic/tonic/src/client/
H A Dgrpc.rs44 max_decoding_message_size: Option<usize>,
46 max_encoding_message_size: Option<usize>,
159 pub fn max_decoding_message_size(mut self, limit: usize) -> Self { in max_decoding_message_size()
189 pub fn max_encoding_message_size(mut self, limit: usize) -> Self { in max_encoding_message_size()
/tonic/tonic-reflection/src/server/
H A Dv1alpha.rs129 fn size_hint(&self) -> (usize, Option<usize>) { in size_hint() argument
H A Dv1.rs129 fn size_hint(&self) -> (usize, Option<usize>) { in size_hint() argument

12