mirror of https://github.com/fafhrd91/actix-web
Re-export actix dependency. Closes #260
This commit is contained in:
parent
77becb9bc0
commit
be4976b16e
|
@ -285,7 +285,6 @@ impl ClientConnector {
|
|||
///
|
||||
/// ```rust
|
||||
/// # #![cfg(feature="alpn")]
|
||||
/// # extern crate actix;
|
||||
/// # extern crate actix_web;
|
||||
/// # extern crate futures;
|
||||
/// # extern crate tokio;
|
||||
|
@ -293,7 +292,7 @@ impl ClientConnector {
|
|||
/// # use std::io::Write;
|
||||
/// # use std::process;
|
||||
/// extern crate openssl;
|
||||
/// use actix::prelude::*;
|
||||
/// use actix_web::actix::prelude::*;
|
||||
/// use actix_web::client::{Connect, ClientConnector};
|
||||
///
|
||||
/// use openssl::ssl::{SslMethod, SslConnector};
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
//! Http client api
|
||||
//!
|
||||
//! ```rust
|
||||
//! # extern crate actix;
|
||||
//! # extern crate actix_web;
|
||||
//! # extern crate futures;
|
||||
//! # extern crate tokio;
|
||||
|
@ -63,7 +62,6 @@ impl ResponseError for SendRequestError {
|
|||
///
|
||||
///
|
||||
/// ```rust
|
||||
/// # extern crate actix;
|
||||
/// # extern crate actix_web;
|
||||
/// # extern crate futures;
|
||||
/// # extern crate tokio;
|
||||
|
|
|
@ -25,7 +25,6 @@ use httprequest::HttpRequest;
|
|||
/// An HTTP Client Request
|
||||
///
|
||||
/// ```rust
|
||||
/// # extern crate actix;
|
||||
/// # extern crate actix_web;
|
||||
/// # extern crate futures;
|
||||
/// # extern crate tokio;
|
||||
|
|
|
@ -224,13 +224,12 @@ pub trait HttpMessage {
|
|||
/// ## Server example
|
||||
///
|
||||
/// ```rust
|
||||
/// # extern crate actix;
|
||||
/// # extern crate actix_web;
|
||||
/// # extern crate env_logger;
|
||||
/// # extern crate futures;
|
||||
/// # use std::str;
|
||||
/// # use actix::*;
|
||||
/// # use actix_web::*;
|
||||
/// # use actix_web::actix::*;
|
||||
/// # use futures::{Future, Stream};
|
||||
/// # use futures::future::{ok, result, Either};
|
||||
/// fn index(mut req: HttpRequest) -> Box<Future<Item=HttpResponse, Error=Error>> {
|
||||
|
|
|
@ -194,6 +194,7 @@ pub use httprequest::HttpRequest;
|
|||
pub use httpresponse::HttpResponse;
|
||||
pub use json::Json;
|
||||
pub use scope::Scope;
|
||||
pub use actix;
|
||||
|
||||
#[doc(hidden)]
|
||||
#[deprecated(since = "0.6.2", note = "please use `use actix_web::ws::WsWriter`")]
|
||||
|
|
|
@ -143,7 +143,6 @@ pub trait IdentityPolicy<S>: Sized + 'static {
|
|||
/// Request identity middleware
|
||||
///
|
||||
/// ```rust
|
||||
/// # extern crate actix;
|
||||
/// # extern crate actix_web;
|
||||
/// use actix_web::App;
|
||||
/// use actix_web::middleware::identity::{IdentityService, CookieIdentityPolicy};
|
||||
|
|
|
@ -32,10 +32,10 @@
|
|||
//! session data.
|
||||
//!
|
||||
//! ```rust
|
||||
//! # extern crate actix;
|
||||
//! # extern crate actix_web;
|
||||
//! use actix_web::{server, App, HttpRequest, Result};
|
||||
//! use actix_web::middleware::session::{RequestSession, SessionStorage, CookieSessionBackend};
|
||||
//! use actix_web::actix;
|
||||
//!
|
||||
//! fn index(req: HttpRequest) -> Result<&'static str> {
|
||||
//! // access session data
|
||||
|
@ -229,7 +229,6 @@ unsafe impl Sync for SessionImplCell {}
|
|||
/// Session storage middleware
|
||||
///
|
||||
/// ```rust
|
||||
/// # extern crate actix;
|
||||
/// # extern crate actix_web;
|
||||
/// use actix_web::App;
|
||||
/// use actix_web::middleware::session::{SessionStorage, CookieSessionBackend};
|
||||
|
|
|
@ -42,9 +42,8 @@ pub(crate) const MAX_WRITE_BUFFER_SIZE: usize = 65_536;
|
|||
/// This is shortcut for `server::HttpServer::new()` method.
|
||||
///
|
||||
/// ```rust
|
||||
/// # extern crate actix;
|
||||
/// # extern crate actix_web;
|
||||
/// use actix::*;
|
||||
/// use actix_web::actix::*;
|
||||
/// use actix_web::{server, App, HttpResponse};
|
||||
///
|
||||
/// fn main() {
|
||||
|
|
|
@ -405,9 +405,8 @@ impl<H: IntoHttpHandler> HttpServer<H> {
|
|||
/// This method requires to run within properly configured `Actix` system.
|
||||
///
|
||||
/// ```rust
|
||||
/// extern crate actix;
|
||||
/// extern crate actix_web;
|
||||
/// use actix_web::{server, App, HttpResponse};
|
||||
/// use actix_web::{actix, server, App, HttpResponse};
|
||||
///
|
||||
/// fn main() {
|
||||
/// // Run actix system, this method actually starts all async processes
|
||||
|
@ -478,7 +477,6 @@ impl<H: IntoHttpHandler> HttpServer<H> {
|
|||
///
|
||||
/// ```rust,ignore
|
||||
/// # extern crate futures;
|
||||
/// # extern crate actix;
|
||||
/// # extern crate actix_web;
|
||||
/// # use futures::Future;
|
||||
/// use actix_web::*;
|
||||
|
|
|
@ -40,7 +40,6 @@ use ws;
|
|||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// # extern crate actix;
|
||||
/// # extern crate actix_web;
|
||||
/// # use actix_web::*;
|
||||
/// #
|
||||
|
|
|
@ -7,9 +7,8 @@
|
|||
//! ## Example
|
||||
//!
|
||||
//! ```rust
|
||||
//! # extern crate actix;
|
||||
//! # extern crate actix_web;
|
||||
//! # use actix::*;
|
||||
//! # use actix_web::actix::*;
|
||||
//! # use actix_web::*;
|
||||
//! use actix_web::{ws, HttpRequest, HttpResponse};
|
||||
//!
|
||||
|
|
Loading…
Reference in New Issue