pub struct ProtocLangOut { /* private fields */ }Expand description
protoc --lang_out=... ... command builder and spawner.
§Examples
use protoc::ProtocLangOut;
ProtocLangOut::new()
.lang("go")
.include("protos")
.include("more-protos")
.out_dir("generated-protos")
.run()
.unwrap();Implementations§
Source§impl ProtocLangOut
impl ProtocLangOut
Sourcepub fn plugin(&mut self, plugin: impl AsRef<OsStr>) -> &mut Self
pub fn plugin(&mut self, plugin: impl AsRef<OsStr>) -> &mut Self
Set --plugin param. Not needed if plugin is in $PATH
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
Trait Implementations§
Source§impl Default for ProtocLangOut
impl Default for ProtocLangOut
Source§fn default() -> ProtocLangOut
fn default() -> ProtocLangOut
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProtocLangOut
impl RefUnwindSafe for ProtocLangOut
impl Send for ProtocLangOut
impl Sync for ProtocLangOut
impl Unpin for ProtocLangOut
impl UnwindSafe for ProtocLangOut
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