pub struct JsonEncoderOptions {
pub pretty_print: bool,
pub indent: String,
}Expand description
Options for JSON encoding.
Fields§
§pretty_print: boolWhether to format the output in indented-form with every textual element on a new line.
If indent is empty, then an arbitrary indent (usually 2 spaces) is chosen if this is true.
indent: StringThe set of indentation characters to use in a multiline formatted output.
If non-empty, then pretty_print is treated as true.
Trait Implementations§
Source§impl Clone for JsonEncoderOptions
impl Clone for JsonEncoderOptions
Source§fn clone(&self) -> JsonEncoderOptions
fn clone(&self) -> JsonEncoderOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JsonEncoderOptions
impl Debug for JsonEncoderOptions
Source§impl Default for JsonEncoderOptions
impl Default for JsonEncoderOptions
Source§fn default() -> JsonEncoderOptions
fn default() -> JsonEncoderOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for JsonEncoderOptions
impl RefUnwindSafe for JsonEncoderOptions
impl Send for JsonEncoderOptions
impl Sync for JsonEncoderOptions
impl Unpin for JsonEncoderOptions
impl UnwindSafe for JsonEncoderOptions
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