pub struct Codegen { /* private fields */ }
Expand description
Protoc --rust_out...
args
Implementations§
Source§impl 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 Freeze for Codegen
impl RefUnwindSafe for Codegen
impl Send for Codegen
impl Sync for Codegen
impl Unpin for Codegen
impl UnwindSafe for Codegen
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more