pub struct BytesCodec;Expand description
A gRPC codec that passes raw protobuf bytes through untouched.
tonic normally (de)serializes messages via prost; we do that ourselves with
prost-reflect, so the codec’s job is reduced to moving already-encoded bytes
in and out of tonic’s framing. Encode and Decode are both Bytes.
Trait Implementations§
Source§impl Clone for BytesCodec
impl Clone for BytesCodec
Source§impl Codec for BytesCodec
impl Codec for BytesCodec
Source§type Encoder = BytesCodec
type Encoder = BytesCodec
The encoder that can encode a message.
Source§type Decoder = BytesCodec
type Decoder = BytesCodec
The decoder that can decode a message.
impl Copy for BytesCodec
Source§impl Decoder for BytesCodec
impl Decoder for BytesCodec
Source§impl Default for BytesCodec
impl Default for BytesCodec
Auto Trait Implementations§
impl Freeze for BytesCodec
impl RefUnwindSafe for BytesCodec
impl Send for BytesCodec
impl Sync for BytesCodec
impl Unpin for BytesCodec
impl UnsafeUnpin for BytesCodec
impl UnwindSafe for BytesCodec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request