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

Protoc --rust_out... args

Implementations

Arguments to the protoc found in $PATH

Set --LANG_out=... param

Append a path to -I args

Append multiple paths to -I args

Append a .proto file path to compile

Append multiple .proto file paths to compile

Specify protoc command path to be used when invoking code generation.

Examples

use protoc_rust::Codegen;

Codegen::new()
    .protoc_path(protoc_bin_vendored::protoc_bin_path().unwrap())
    // ...
    .run()
    .unwrap();

Set options to customize code generation

Like protoc --rust_out=... but without requiring protoc-gen-rust command in $PATH.

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.