From 5bd5f67d79ff67f0c134f389b155adf448ccc92e Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 6 Apr 2018 12:31:31 -0700 Subject: [PATCH] add Pause message constructors --- src/client/connector.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/client/connector.rs b/src/client/connector.rs index 0ad066ae8..dbd98bfb6 100644 --- a/src/client/connector.rs +++ b/src/client/connector.rs @@ -78,6 +78,19 @@ pub struct Pause { time: Option, } +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 = (); }