pub struct Customize { /* private fields */ }
Expand description

Specifies style of generated code. Generated files can be customized using this proto or using rustproto.proto options.

Implementations

Insert code before the element in the generated file (e. g. serde annotations, see example here).

Generate code for “lite runtime”. Generated code contains no code for reflection. So the generated code (and more importantly, generated binary size) is smaller, but reflection, text format, JSON serialization won’t work.

Note when using protoc plugin protoc-gen-rust, the option name is just lite.

Generate mod.rs with all the generated modules. This option is on by default in rust-protobuf version 3.

Generate code bundled in protobuf crate. Regular users don’t need this option.

Update fields of self with fields defined in other customize

Update unset fields of self with fields from other customize

Parse customize options from a string passed via protoc flag.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.