[][src]Struct protoc::Protoc

pub struct Protoc { /* fields omitted */ }

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

impl Clone for Protoc[src]

impl Debug for Protoc[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.