Home
last modified time | relevance | path

Searched refs:Bytes (Results 1 – 25 of 27) sorted by relevance

12

/tonic/tonic/src/metadata/
H A Dencoding.rs2 use bytes::Bytes;
17 use bytes::Bytes;
29 fn from_shared(value: Bytes) -> Result<HeaderValue, InvalidMetadataValueBytes>; in from_shared()
35 fn decode(value: &[u8]) -> Result<Bytes, InvalidMetadataValueBytes>; in decode() argument
89 fn from_shared(value: Bytes) -> Result<HeaderValue, InvalidMetadataValueBytes> { in from_shared()
97 fn decode(value: &[u8]) -> Result<Bytes, InvalidMetadataValueBytes> { in decode() argument
98 Ok(Bytes::copy_from_slice(value)) in decode()
132 HeaderValue::from_maybe_shared(Bytes::from(encoded_value)) in from_bytes()
136 fn from_shared(value: Bytes) -> Result<HeaderValue, InvalidMetadataValueBytes> { in from_shared()
147 HeaderValue::from_maybe_shared_unchecked(Bytes::from_static(value.as_ref())) in from_static()
[all …]
H A Dvalue.rs6 use bytes::Bytes;
87 pub unsafe fn from_shared_unchecked(src: Bytes) -> Self { in from_shared_unchecked()
129 pub fn to_bytes(&self) -> Result<Bytes, InvalidMetadataValueBytes> { in to_bytes() argument
306 impl<VE: ValueEncoding> TryFrom<Bytes> for MetadataValue<VE> {
310 fn try_from(src: Bytes) -> Result<Self, Self::Error> { in try_from()
582 impl<VE: ValueEncoding> From<MetadataValue<VE>> for Bytes { implementation
584 fn from(value: MetadataValue<VE>) -> Bytes { in from() argument
585 Bytes::copy_from_slice(value.inner.as_bytes()) in from()
850 Bmv::from_shared_unchecked(Bytes::from_static(b"..{}")), in test_value_eq_value()
851 Bmv::from_shared_unchecked(Bytes::from_static(b"{}..")) in test_value_eq_value()
[all …]
H A Dkey.rs1 use bytes::Bytes;
193 impl<VE: ValueEncoding> From<MetadataKey<VE>> for Bytes { implementation
195 fn from(name: MetadataKey<VE>) -> Bytes { in from() argument
196 Bytes::copy_from_slice(name.inner.as_ref()) in from()
/tonic/tonic/benches/
H A Ddecode.rs4 use bytes::{Buf, BufMut, Bytes, BytesMut};
45 data: Bytes,
50 fn new(data: Bytes, chunk_size: usize) -> Self { in new() argument
60 type Data = Bytes;
113 fn make_payload(message_length: usize, message_count: usize) -> Bytes { in make_payload() argument
/tonic/tonic/src/
H A Dbody.rs8 type BoxBody = http_body_util::combinators::UnsyncBoxBody<bytes::Bytes, crate::Status>;
35 B: http_body::Body<Data = bytes::Bytes> + Send + 'static, in new()
68 type Data = bytes::Bytes;
H A Dcodegen.rs15 pub use bytes::Bytes;
H A Dstatus.rs4 use bytes::Bytes;
44 details: Bytes,
166 details: Bytes::new(), in new()
456 None => Bytes::new(), in from_header_map()
523 let to_write = Bytes::copy_from_slice( in add_header()
546 pub fn with_details(code: Code, message: impl Into<String>, details: Bytes) -> Status { in with_details()
552 Self::with_details_and_metadata(code, message, Bytes::new(), metadata) in with_metadata()
559 details: Bytes, in with_details_and_metadata() argument
/tonic/tonic-web/src/
H A Dcall.rs6 use bytes::{Buf, BufMut, Bytes, BytesMut};
144 fn decode_chunk(mut self: Pin<&mut Self>) -> Result<Option<Bytes>, Status> { in decode_chunk() argument
156 .map(|decoded| Some(Bytes::from(decoded))) in decode_chunk()
173 ) -> Poll<Option<Result<Frame<Bytes>, Status>>> { in poll_decode() argument
219 ) -> Poll<Option<Result<Frame<Bytes>, Status>>> { in poll_encode() argument
255 type Data = Bytes;
344 type Item = Result<Frame<Bytes>, Status>;
390 fn decode_trailers_frame(mut buf: Bytes) -> Result<Option<HeaderMap>, Status> { in decode_trailers_frame()
446 fn make_trailers_frame(trailers: HeaderMap) -> Bytes { in make_trailers_frame() argument
636 let trailers = decode_trailers_frame(Bytes::copy_from_slice(&buf[..])) in decode_multiple_trailers()
[all …]
H A Dservice.rs49 B: http_body::Body<Data = bytes::Bytes> + Send + 'static,
208 B: http_body::Body<Data = bytes::Bytes> + Send + 'static, in coerce_request()
229 B: http_body::Body<Data = bytes::Bytes> + Send + 'static, in coerce_response()
/tonic/tests/compression/src/
H A Dutil.rs2 use bytes::{Buf, Bytes};
47 B: HttpBody<Data = Bytes>,
77 fn frame_data_length(frame: &http_body::Frame<Bytes>) -> usize { in frame_data_length()
/tonic/tests/web/tests/
H A Dgrpc_web.rs4 use bytes::{Buf, BufMut, Bytes, BytesMut};
87 fn encode_body() -> Bytes { in encode_body()
138 async fn decode_body(body: Incoming, content_type: &str) -> (Output, Bytes) { in decode_body() argument
/tonic/tonic/src/codec/
H A Dbuffer.rs2 use bytes::{Buf, BufMut, Bytes, BytesMut};
48 fn copy_to_bytes(&mut self, len: usize) -> Bytes { in copy_to_bytes() argument
H A Dprost.rs351 use bytes::Bytes;
360 data: Bytes,
372 data: Bytes::copy_from_slice(b), in new()
380 type Data = Bytes;
H A Dencode.rs6 use bytes::{BufMut, Bytes, BytesMut};
75 type Item = Result<Bytes, Status>;
308 type Data = Bytes;
/tonic/tonic/src/transport/server/
H A Dmod.rs48 use bytes::Bytes;
553 ResBody: http_body::Body<Data = Bytes> + Send + 'static, in serve()
574 ResBody: http_body::Body<Data = Bytes> + Send + 'static, in serve_with_shutdown()
597 ResBody: http_body::Body<Data = Bytes> + Send + 'static, in serve_with_incoming()
621 ResBody: http_body::Body<Data = Bytes> + Send + 'static, in serve_with_incoming_shutdown()
643 ResBody: http_body::Body<Data = Bytes> + Send + 'static, in serve_internal()
884 ResBody: http_body::Body<Data = Bytes> + Send + 'static, in serve()
907 ResBody: http_body::Body<Data = Bytes> + Send + 'static, in serve_with_shutdown()
991 ResBody: http_body::Body<Data = Bytes> + Send + 'static,
1035 ResBody: http_body::Body<Data = Bytes> + Send + 'static,
[all …]
/tonic/tonic/src/transport/channel/
H A Dendpoint.rs8 use bytes::Bytes;
82 pub fn from_shared(s: impl Into<Bytes>) -> Result<Self, Error> { in from_shared()
472 impl TryFrom<Bytes> for Endpoint {
475 fn try_from(t: Bytes) -> Result<Self, Self::Error> { in try_from()
H A Dmod.rs15 use bytes::Bytes;
100 pub fn from_shared(s: impl Into<Bytes>) -> Result<Endpoint, InvalidUri> { in from_shared()
/tonic/tonic/benches-disabled/benchmarks/
H A Drequest_response.rs38 group.throughput(Throughput::Bytes(size.len() as u64)); in bench_throughput()
H A Drequest_response_diverse_types.rs88 group.throughput(Throughput::Bytes(size.len() as u64)); in bench_throughput()
/tonic/tests/integration_tests/tests/
H A Dstatus.rs1 use bytes::Bytes;
28 Bytes::from_static(&[1]), in status_with_details()
/tonic/tonic/src/service/
H A Drouter.rs145 B: http_body::Body<Data = bytes::Bytes> + Send + 'static,
/tonic/tonic/benches-disabled/benchmarks/compiled_protos/
H A Dhelloworld.rs38 <T::ResponseBody as Body>::Data: Into<bytes::Bytes> + Send,
/tonic/tonic-types/src/richer_error/
H A Dmod.rs2 bytes::{Bytes, BytesMut},
37 fn gen_details_bytes(code: Code, message: &str, details: Vec<Any>) -> Bytes { in gen_details_bytes() argument
/tonic/tonic-build/src/
H A Dclient.rs72 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static, in generate_internal()
/tonic/tonic-health/src/generated/
H A Dgrpc_health_v1.rs77 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,

12