1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-08-02 18:55:05 +00:00

update doc strings

This commit is contained in:
Nikolay Kim 2018-03-28 21:49:50 -07:00
parent 45dec8d0c0
commit d14991ec96
3 changed files with 9 additions and 4 deletions

View file

@ -140,7 +140,7 @@ pub use application::Application;
pub use httpmessage::HttpMessage;
pub use httprequest::HttpRequest;
pub use httpresponse::HttpResponse;
pub use handler::{Either, Reply, Responder, NormalizePath, AsyncResponder, FutureResponse};
pub use handler::{Either, Responder, NormalizePath, AsyncResponder, FutureResponse};
pub use route::Route;
pub use resource::Resource;
pub use context::HttpContext;
@ -185,12 +185,12 @@ pub mod dev {
pub use body::BodyStream;
pub use context::Drain;
pub use info::ConnectionInfo;
pub use handler::Handler;
pub use handler::{Handler, Reply};
pub use 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 httpmessage::{UrlEncodedFut, MessageBody};
pub use httpresponse::HttpResponseBuilder;
}

View file

@ -163,7 +163,7 @@ impl<S: 'static> Route<S> {
/// count: u32,
/// }
///
/// /// extract path info using serde
/// /// extract path and query information using serde
/// fn index(p: Path<PParam>, q: Query<QParam>) -> Result<String> {
/// Ok(format!("Welcome {}!", p.username))
/// }
@ -183,6 +183,7 @@ impl<S: 'static> Route<S> {
self.h(with2(handler))
}
/// Set handler function, function has to accept three request extractors.
pub fn with3<T1, T2, T3, F, R>(&mut self, handler: F)
where F: Fn(T1, T2, T3) -> R + 'static,
R: Responder + 'static,

View file

@ -267,6 +267,10 @@ impl Drop for TestServer {
}
}
/// An `TestServer` builder
///
/// This type can be used to construct an instance of `TestServer` through a
/// builder-like pattern.
pub struct TestServerBuilder<S> {
state: Box<Fn() -> S + Sync + Send + 'static>,
#[cfg(feature="alpn")]