From 9f5a91ae3c565172c681245bd638aec9ba97b47d Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 27 Mar 2018 21:59:55 -0700 Subject: [PATCH] export types --- .travis.yml | 2 +- src/extractor.rs | 4 ++++ src/lib.rs | 5 +++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e8cd0c524..7aa8ebaa9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -76,7 +76,7 @@ script: # Upload docs after_success: - | - if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "mdbook" && "$TRAVIS_RUST_VERSION" == "beta" ]]; then + if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_RUST_VERSION" == "beta" ]]; then cargo doc --features "alpn, tls, session" --no-deps && echo "" > target/doc/index.html && curl -sL https://github.com/rust-lang-nursery/mdBook/releases/download/v0.1.5/mdbook-v0.1.5-x86_64-unknown-linux-gnu.tar.gz | tar xvz -C $HOME/.cargo/bin && diff --git a/src/extractor.rs b/src/extractor.rs index a5255e12e..0736b00d6 100644 --- a/src/extractor.rs +++ b/src/extractor.rs @@ -17,6 +17,8 @@ pub trait HttpRequestExtractor: Sized where T: DeserializeOwned, S: 'stati /// Extract typed information from the request's path. /// +/// `S` - application state type +/// /// ## Example /// /// ```rust @@ -99,6 +101,8 @@ impl HttpRequestExtractor for Path /// Extract typed information from from the request's query. /// +/// `S` - application state type +/// /// ## Example /// /// ```rust diff --git a/src/lib.rs b/src/lib.rs index 60788e036..be7b2fd9d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -145,7 +145,7 @@ pub use route::Route; pub use resource::Resource; pub use context::HttpContext; pub use server::HttpServer; -pub use extractor::{Path, Query, HttpRequestExtractor}; +pub use extractor::{Path, Query}; // re-exports pub use http::{Method, StatusCode, Version}; @@ -186,10 +186,11 @@ pub mod dev { pub use context::Drain; pub use info::ConnectionInfo; pub use handler::Handler; - pub use with::With; + pub use with::{With, WithHandler}; pub use json::JsonBody; pub use router::{Router, Pattern}; pub use param::{FromParam, Params}; + pub use extractor::HttpRequestExtractor; pub use httpmessage::{UrlEncoded, MessageBody}; pub use httpresponse::HttpResponseBuilder; }