We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9dab8be commit d4bd475Copy full SHA for d4bd475
tonic-build/src/prost.rs
@@ -412,10 +412,16 @@ impl Builder {
412
config.protoc_arg(arg);
413
}
414
415
- config.service_generator(Box::new(ServiceGenerator::new(self)));
+ config.service_generator(self.service_generator());
416
417
config.compile_protos(protos, includes)?;
418
419
Ok(())
420
421
+
422
+ /// Turn the builder into a `ServiceGenerator` ready to be passed to `prost-build`s
423
+ /// `Config::service_generator`.
424
+ pub fn service_generator(self) -> Box<dyn prost_build::ServiceGenerator> {
425
+ Box::new(ServiceGenerator::new(self))
426
+ }
427
0 commit comments