1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-24 07:53:00 +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
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
extern crate actix_web;
use actix_web::{server, App, Path};

View File

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

View File

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

View File

@ -17,7 +17,7 @@ contains the following:
```toml
[dependencies]
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.

View File

@ -78,6 +78,19 @@ pub struct Pause {
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 {
type Result = ();
}