mirror of
https://github.com/actix/actix-web.git
synced 2024-09-09 05:08:32 +00:00
add Pause message constructors
This commit is contained in:
parent
8d5fa6ee71
commit
5bd5f67d79
1 changed files with 13 additions and 0 deletions
|
@ -78,6 +78,19 @@ pub struct Pause {
|
||||||
time: Option<Duration>,
|
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 {
|
impl Message for Pause {
|
||||||
type Result = ();
|
type Result = ();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue