pub struct Protoc { /* private fields */ }Expand description
Protoc command.
Implementations§
Source§impl 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 Freeze for Protoc
impl RefUnwindSafe for Protoc
impl Send for Protoc
impl Sync for Protoc
impl Unpin for Protoc
impl UnwindSafe for Protoc
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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