Struct protoc::ProtocLangOut
source · [−]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
sourceimpl 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
Trait Implementations
sourceimpl Default for ProtocLangOut
impl Default for ProtocLangOut
sourcefn default() -> ProtocLangOut
fn default() -> ProtocLangOut
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for ProtocLangOut
impl Send for ProtocLangOut
impl Sync for ProtocLangOut
impl Unpin for ProtocLangOut
impl UnwindSafe for ProtocLangOut
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