[][src]Struct protobuf::json::PrintOptions

pub struct PrintOptions {
    pub enum_values_int: bool,
    pub proto_field_name: bool,
    pub always_output_default_values: bool,
    pub _future_options: (),
}

Options for printing JSON to string

Examples

use protobuf::json;
let print_options = json::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

impl Default for PrintOptions[src]

impl Clone for PrintOptions[src]

impl Debug for PrintOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]