[][src]Struct pb_jelly_gen::GenProtos

pub struct GenProtos { /* fields omitted */ }

A builder struct to configure the way your protos are generated, create one with GenProtos::builder()

Implementations

impl GenProtos[src]

pub fn builder() -> GenProtos[src]

Create a default builder

pub fn out_path<P: AsRef<Path>>(self, path: P) -> GenProtos[src]

Set the output path for the generated code. This should be relative to the current crate's manifest.

Defaults to the <current crate's manifest>/gen

pub fn abs_out_path<P: AsRef<Path>>(self, path: P) -> GenProtos[src]

Set the output path for the generate code. This will be treated as an absolute path.

pub fn src_path<P: AsRef<Path>>(self, path: P) -> GenProtos[src]

Add a path to a .proto file, or a directory containing your proto files.

pub fn src_paths<P: AsRef<Path>, I: IntoIterator<Item = P>>(
    self,
    paths: I
) -> GenProtos
[src]

Add a list of paths to .proto files, or to directories containing your proto files.

pub fn include_path<P: AsRef<Path>>(self, path: P) -> GenProtos[src]

A path to a protobuf file, or a directory containing protobuf files, that get included in the proto compilation. Rust bindings will not be generated for these files, but the proto compiler will look at included paths for proto dependencies.

pub fn include_paths<P: AsRef<Path>, I: IntoIterator<Item = P>>(
    self,
    paths: I
) -> GenProtos
[src]

Paths to a protobuf files, or directories containing protobuf files, that get included in the proto compilation. Rust bindings will not be generated for these files, but the proto compiler will look at included paths for proto dependencies.

pub fn include_extensions(self, include: bool) -> GenProtos[src]

Include rust/extensions.proto in the proto compilation.

Defaults to true

pub fn cleanup_out_path(self, cleanup: bool) -> GenProtos[src]

If true, before proto compilation, will delete whatever exists at out_path and create a directory at that location.

pub fn gen_protos(self)[src]

Consumes the builder and generates Rust bindings to your proto files.

Trait Implementations

impl Default for GenProtos[src]

Auto Trait Implementations

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, 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.