Struct protoc::Protoc [−][src]
Protoc command.
Implementations
impl Protoc
[src]
pub fn from_env_path() -> Protoc
[src]
New protoc
command from $PATH
pub fn from_path(path: impl AsRef<OsStr>) -> Protoc
[src]
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());
pub fn check(&self) -> Result<()>
[src]
Check protoc
command found and valid
pub fn version(&self) -> Result<Version>
[src]
Obtain protoc
version
pub fn run(&self, args: Args<'_>) -> Result<()>
[src]
👎 Deprecated since 2.13:
Use ProtocLangOut instead
Execute configured protoc
with given args
pub fn write_descriptor_set(&self, args: DescriptorSetOutArgs<'_>) -> Result<()>
[src]
Execute protoc --descriptor_set_out=
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Protoc
[src]
impl Send for Protoc
[src]
impl Sync for Protoc
[src]
impl Unpin for Protoc
[src]
impl UnwindSafe for Protoc
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,