Struct protobuf_json_mapping::PrintOptions
source · pub struct PrintOptions {
pub enum_values_int: bool,
pub proto_field_name: bool,
pub always_output_default_values: bool,
pub _future_options: (),
}
Expand description
Options for printing JSON to string
Examples
let print_options = protobuf_json_mapping::PrintOptions {
enum_values_int: true,
..Default::default()
};
Fields§
§enum_values_int: bool
Use ints instead of strings for enums.
Note both string or int can be parsed.
proto_field_name: bool
Use protobuf field names instead of lowerCamelCase
which is used by default.
Note both names are supported when JSON is parsed.
always_output_default_values: bool
Output field default values.
_future_options: ()
Prevent initializing PrintOptions
enumerating all field.
Trait Implementations§
source§impl Clone for PrintOptions
impl Clone for PrintOptions
source§fn clone(&self) -> PrintOptions
fn clone(&self) -> PrintOptions
Returns a copy 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 PrintOptions
impl Debug for PrintOptions
source§impl Default for PrintOptions
impl Default for PrintOptions
source§fn default() -> PrintOptions
fn default() -> PrintOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for PrintOptions
impl Send for PrintOptions
impl Sync for PrintOptions
impl Unpin for PrintOptions
impl UnwindSafe for PrintOptions
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