1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-30 00:29:29 +02:00

re-arrange modules and exports

This commit is contained in:
Nikolay Kim
2018-03-30 17:31:18 -07:00
parent b16419348e
commit 9e751de707
49 changed files with 373 additions and 483 deletions

View File

@@ -51,8 +51,7 @@ use httpresponse::HttpResponse;
/// # extern crate actix_web;
/// # extern crate futures;
/// #[macro_use] extern crate serde_derive;
/// # use actix_web::*;
/// use actix_web::Json;
/// use actix_web::{Application, Json, Result, http};
///
/// #[derive(Deserialize)]
/// struct Info {
@@ -67,7 +66,7 @@ use httpresponse::HttpResponse;
/// fn main() {
/// let app = Application::new().resource(
/// "/index.html",
/// |r| r.method(Method::POST).with(index)); // <- use `with` extractor
/// |r| r.method(http::Method::POST).with(index)); // <- use `with` extractor
/// }
/// ```
pub struct Json<T>(pub T);
@@ -139,8 +138,9 @@ impl<T, S> FromRequest<S> for Json<T>
/// # extern crate actix_web;
/// # extern crate futures;
/// # #[macro_use] extern crate serde_derive;
/// use actix_web::*;
/// use futures::future::Future;
/// use actix_web::{Application, AsyncResponder,
/// HttpRequest, HttpResponse, HttpMessage, Error, httpcodes};
///
/// #[derive(Deserialize, Debug)]
/// struct MyObj {