pub struct Builder { /* private fields */ }

Implementations

Create a new Builder

Configures the output directory where generated Rust files will be written.

If unset, defaults to the OUT_DIR environment variable. OUT_DIR is set by Cargo when executing build scripts, so out_dir typically does not need to be configured.

Register an encoded FileDescriptorSet with this Builder

Register a decoded FileDescriptor with this Builder

Don’t generate code for the following type prefixes

Configures the code generator to not strip the enum name from variant names.

Declare an externally provided Protobuf package or type

Don’t error out in the presence of unknown fields when deserializing, instead skip the field.

Generate Rust BTreeMap implementations for Protobuf map type fields.

Output fields with their default values.

Output fields with their original names as defined in their proto schemas, instead of lowerCamelCase

Generates code for all registered types where prefixes contains a prefix of the fully-qualified path of the type

Generates code into instances of write as provided by the write_factory

This function is intended for use when writing output of code generation directly to output files is not desired. For most use cases inside a build.rs file, the build() method should be preferred.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

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 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.