Struct protoc_rust::Codegen
source · [−]pub struct Codegen { /* private fields */ }
Expand description
Protoc --rust_out...
args
Implementations
sourceimpl Codegen
impl Codegen
sourcepub fn includes(
&mut self,
includes: impl IntoIterator<Item = impl AsRef<Path>>
) -> &mut Self
pub fn includes(
&mut self,
includes: impl IntoIterator<Item = impl AsRef<Path>>
) -> &mut Self
Append multiple paths to -I
args
sourcepub fn input(&mut self, input: impl AsRef<Path>) -> &mut Self
pub fn input(&mut self, input: impl AsRef<Path>) -> &mut Self
Append a .proto
file path to compile
sourcepub fn inputs(
&mut self,
inputs: impl IntoIterator<Item = impl AsRef<Path>>
) -> &mut Self
pub fn inputs(
&mut self,
inputs: impl IntoIterator<Item = impl AsRef<Path>>
) -> &mut Self
Append multiple .proto
file paths to compile
sourcepub fn protoc_path(&mut self, protoc: impl Into<PathBuf>) -> &mut Self
pub fn protoc_path(&mut self, protoc: impl Into<PathBuf>) -> &mut Self
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();
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Codegen
impl Send for Codegen
impl Sync for Codegen
impl Unpin for Codegen
impl UnwindSafe for Codegen
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more