1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-30 18:44:35 +01:00

Merge branch 'master' into guide

This commit is contained in:
memoryruins 2018-04-06 19:04:50 -04:00
commit c04e0fdec4
5 changed files with 24 additions and 3 deletions

View File

@ -31,6 +31,14 @@ Actix web is a simple, pragmatic, extremely fast, web framework for Rust.
## Example ## Example
At the moment all examples uses actix-web master.
```toml
[dependencies]
actix = "0.5"
actix-web = { git="https://github.com/actix/actix-web.git" }
```
```rust ```rust
extern crate actix_web; extern crate actix_web;
use actix_web::{server, App, Path}; use actix_web::{server, App, Path};

View File

@ -5,7 +5,7 @@ authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
workspace = "../.." workspace = "../.."
[dependencies] [dependencies]
futures = "*" futures = "0.1"
env_logger = "0.5" env_logger = "0.5"
actix = "0.5" actix = "0.5"
actix-web = { path="../.." } actix-web = { path="../.." }

View File

@ -5,7 +5,7 @@ authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
workspace = "../.." workspace = "../.."
[dependencies] [dependencies]
futures = "*" futures = "0.1"
env_logger = "0.5" env_logger = "0.5"
actix = "0.5" actix = "0.5"
actix-web = { path = "../../" } actix-web = { path = "../../" }

View File

@ -17,7 +17,7 @@ contains the following:
```toml ```toml
[dependencies] [dependencies]
actix = "0.5" actix = "0.5"
actix-web = "0.4" actix-web = { git="https://github.com/actix/actix-web.git" }
``` ```
In order to implement a web server, we first need to create a request handler. In order to implement a web server, we first need to create a request handler.

View File

@ -78,6 +78,19 @@ pub struct Pause {
time: Option<Duration>, time: Option<Duration>,
} }
impl Pause {
/// Create message with pause duration parameter
pub fn new(time: Duration) -> Pause {
Pause{time: Some(time)}
}
}
impl Default for Pause {
fn default() -> Pause {
Pause{time: None}
}
}
impl Message for Pause { impl Message for Pause {
type Result = (); type Result = ();
} }