Struct pb_jelly_gen::GenProtos
source · pub struct GenProtos { /* private fields */ }
Expand description
A builder struct to configure the way your protos are generated, create one with GenProtos::builder()
Implementations§
source§impl GenProtos
impl GenProtos
sourcepub fn out_path<P: AsRef<Path>>(self, path: P) -> GenProtos
pub fn out_path<P: AsRef<Path>>(self, path: P) -> GenProtos
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
sourcepub fn abs_out_path<P: AsRef<Path>>(self, path: P) -> GenProtos
pub fn abs_out_path<P: AsRef<Path>>(self, path: P) -> GenProtos
Set the output path for the generate code. This will be treated as an absolute path.
sourcepub fn src_path<P: AsRef<Path>>(self, path: P) -> GenProtos
pub fn src_path<P: AsRef<Path>>(self, path: P) -> GenProtos
Add a path to a .proto
file, or a directory containing your proto files.
sourcepub fn src_paths<P: AsRef<Path>, I: IntoIterator<Item = P>>(
self,
paths: I
) -> GenProtos
pub fn src_paths<P: AsRef<Path>, I: IntoIterator<Item = P>>( self, paths: I ) -> GenProtos
Add a list of paths to .proto
files, or to directories containing your proto files.
sourcepub fn include_path<P: AsRef<Path>>(self, path: P) -> GenProtos
pub fn include_path<P: AsRef<Path>>(self, path: P) -> GenProtos
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.
sourcepub fn include_paths<P: AsRef<Path>, I: IntoIterator<Item = P>>(
self,
paths: I
) -> GenProtos
pub fn include_paths<P: AsRef<Path>, I: IntoIterator<Item = P>>( self, paths: I ) -> GenProtos
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.
sourcepub fn include_extensions(self, include: bool) -> GenProtos
pub fn include_extensions(self, include: bool) -> GenProtos
Include rust/extensions.proto
in the proto compilation.
Defaults to true
sourcepub fn cleanup_out_path(self, cleanup: bool) -> GenProtos
pub fn cleanup_out_path(self, cleanup: bool) -> GenProtos
If true, before proto compilation, will delete whatever exists at out_path
and create a
directory at that location.
sourcepub fn gen_protos(self)
pub fn gen_protos(self)
Consumes the builder and generates Rust bindings to your proto files.