pub struct Protoc { /* private fields */ }
Expand description
Protoc command.
Implementations
sourceimpl Protoc
impl Protoc
sourcepub fn from_env_path() -> Protoc
pub fn from_env_path() -> Protoc
New protoc
command from $PATH
sourcepub fn from_path(path: impl AsRef<OsStr>) -> Protoc
pub fn from_path(path: impl AsRef<OsStr>) -> Protoc
New protoc
command from specified path
Examples
// Use a binary from `protoc-bin-vendored` crate
let protoc = protoc::Protoc::from_path(
protoc_bin_vendored::protoc_bin_path().unwrap());
sourcepub fn run(&self, args: Args<'_>) -> Result<()>
👎Deprecated since 2.13: Use ProtocLangOut instead
pub fn run(&self, args: Args<'_>) -> Result<()>
Execute configured protoc
with given args
sourcepub fn write_descriptor_set(&self, args: DescriptorSetOutArgs<'_>) -> Result<()>
pub fn write_descriptor_set(&self, args: DescriptorSetOutArgs<'_>) -> Result<()>
Execute protoc --descriptor_set_out=
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Protoc
impl Send for Protoc
impl Sync for Protoc
impl Unpin for Protoc
impl UnwindSafe for Protoc
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