Struct protobuf_codegen_pure::Codegen [−][src]
pub struct Codegen { /* fields omitted */ }
Invoke pure rust codegen. See crate docs for example.
Implementations
impl Codegen
[src]
impl Codegen
[src]pub fn new() -> Self
[src]
Fresh new codegen object.
pub fn out_dir(&mut self, out_dir: impl AsRef<Path>) -> &mut Self
[src]
Set the output directory for codegen.
pub fn include(&mut self, include: impl AsRef<Path>) -> &mut Self
[src]
Add an include directory.
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
Add include directories.
pub fn input(&mut self, input: impl AsRef<Path>) -> &mut Self
[src]
Add an input (.proto
file).
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
Add inputs (.proto
files).
pub fn customize(&mut self, customize: Customize) -> &mut Self
[src]
Specify generated code Customize
object.
pub fn run(&self) -> Result<()>
[src]
Like protoc --rust_out=...
but without requiring protoc
or protoc-gen-rust
commands in $PATH
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Codegen
impl RefUnwindSafe for Codegen
impl UnwindSafe for Codegen
impl UnwindSafe for Codegen