chore: Fix feature flags and build docs (#311)

Signed-off-by: Lucio Franco <[email protected]>
This commit is contained in:
Lucio Franco
2020-03-30 12:02:10 -04:00
committed by GitHub
parent 59c7788846
commit 3cba9f5f6f
14 changed files with 258 additions and 247 deletions
+5 -2
View File
@@ -1,10 +1,13 @@
use super::schema::{Commentable, Method, Service};
use super::{Method, Service};
use crate::{generate_doc_comment, generate_doc_comments, naive_snake_case};
use proc_macro2::{Span, TokenStream};
use quote::quote;
use syn::{Ident, Lit, LitStr};
/// Generate service for Server
/// Generate service for Server.
///
/// This takes some `Service` and will generate a `TokenStream` that contains
/// a public module containing the server service and handler trait.
pub fn generate<T: Service>(service: &T, proto_path: &str) -> TokenStream {
let methods = generate_methods(service, proto_path);