Struct protoc_rust::Codegen [−][src]
pub struct Codegen { /* fields omitted */ }Protoc --rust_out... args
Implementations
impl Codegen[src]
impl Codegen[src]pub fn new() -> Self[src]
Arguments to the protoc found in $PATH
pub fn out_dir(&mut self, out_dir: impl AsRef<Path>) -> &mut Self[src]
Set --LANG_out=... param
pub fn include(&mut self, include: impl AsRef<Path>) -> &mut Self[src]
Append a path to -I args
pub fn includes(
&mut self,
includes: impl IntoIterator<Item = impl AsRef<Path>>
) -> &mut Self[src]
&mut self,
includes: impl IntoIterator<Item = impl AsRef<Path>>
) -> &mut Self
Append multiple paths to -I args
pub fn input(&mut self, input: impl AsRef<Path>) -> &mut Self[src]
Append a .proto file path to compile
pub fn inputs(
&mut self,
inputs: impl IntoIterator<Item = impl AsRef<Path>>
) -> &mut Self[src]
&mut self,
inputs: impl IntoIterator<Item = impl AsRef<Path>>
) -> &mut Self
Append multiple .proto file paths to compile
pub fn protoc_path(&mut self, protoc: impl Into<PathBuf>) -> &mut Self[src]
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();
pub fn customize(&mut self, customize: Customize) -> &mut Self[src]
Set options to customize code generation
pub fn run(&self) -> Result<()>[src]
Like protoc --rust_out=... but without requiring protoc-gen-rust command in $PATH.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Codegen
impl RefUnwindSafe for Codegenimpl UnwindSafe for Codegen
impl UnwindSafe for Codegen