1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 08:22:59 +01:00

add Pause message constructors

This commit is contained in:
Nikolay Kim 2018-04-06 12:31:31 -07:00
parent 8d5fa6ee71
commit 5bd5f67d79

View File

@ -78,6 +78,19 @@ pub struct Pause {
time: Option<Duration>,
}
impl Pause {
/// Create message with pause duration parameter
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 = ();
}