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 duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const 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 Freeze for PrintOptions
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