pub struct JsonCodec { /* private fields */ }Expand description
Implements Codec for the JSON format.
This codec handles the application/json content type.
Implementations§
Source§impl JsonCodec
impl JsonCodec
Sourcepub fn pretty() -> Self
pub fn pretty() -> Self
Creates a new JsonCodec with pretty printing enabled (default indentation).
Sourcepub fn with_encoder_options(self, options: JsonEncoderOptions) -> Self
pub fn with_encoder_options(self, options: JsonEncoderOptions) -> Self
Configures the codec with the given encoder options.
Sourcepub fn with_decoder_options(self, options: JsonDecoderOptions) -> Self
pub fn with_decoder_options(self, options: JsonDecoderOptions) -> Self
Configures the codec with the given decoder options.
Trait Implementations§
Source§impl Codec for JsonCodec
impl Codec for JsonCodec
Auto Trait Implementations§
impl Freeze for JsonCodec
impl RefUnwindSafe for JsonCodec
impl Send for JsonCodec
impl Sync for JsonCodec
impl Unpin for JsonCodec
impl UnwindSafe for JsonCodec
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