chore(build): Refactor codegen traits (#302)

Signed-off-by: Lucio Franco <[email protected]>
This commit is contained in:
Lucio Franco
2020-03-29 12:57:11 -04:00
committed by GitHub
parent 012fa3cb4a
commit 2e082f8b3e
13 changed files with 113 additions and 144 deletions
+7 -3
View File
@@ -23,7 +23,7 @@
//!
//! ```rust,no_run
//! fn main() -> Result<(), Box<dyn std::error::Error>> {
//! tonic_build::prost::compile_protos("proto/service.proto")?;
//! tonic_build::compile_protos("proto/service.proto")?;
//! Ok(())
//! }
//! ```
@@ -32,7 +32,7 @@
//!
//! ```rust,no_run
//! fn main() -> Result<(), Box<dyn std::error::Error>> {
//! tonic_build::prost::configure()
//! tonic_build::configure()
//! .build_server(false)
//! .compile(
//! &["proto/helloworld/helloworld.proto"],
@@ -61,7 +61,11 @@ use quote::TokenStreamExt;
/// Prost generator
#[cfg(feature = "prost")]
pub mod prost;
mod prost;
#[cfg(feature = "prost")]
pub use prost::{compile_protos, configure, Builder};
/// Traits to describe schema
pub mod schema;