diff options
Diffstat (limited to 'lib/src/reactor/ctrl.rs')
-rw-r--r-- | lib/src/reactor/ctrl.rs | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/lib/src/reactor/ctrl.rs b/lib/src/reactor/ctrl.rs index 92246a9..a745394 100644 --- a/lib/src/reactor/ctrl.rs +++ b/lib/src/reactor/ctrl.rs @@ -3,6 +3,9 @@ use std::fmt::Debug; use tokio::sync::mpsc::UnboundedSender as Sender; use tokio::sync::mpsc::UnboundedReceiver as Receiver; +use crate::reactor::ReactorReply; +use crate::reactor::ReactorRequest; + /// Type for sending messages to a reactor pub type ReactorSender<CustomRequest, CustomReply> = Sender<(ReactorRequest<CustomRequest>, ReplyChannel<CustomReply>)>; @@ -15,22 +18,3 @@ pub type ReplyChannel<CustomReply> = Sender<ReactorReply<CustomReply>>; pub type ReplyReceiver<CustomReply> = Receiver<ReactorReply<CustomReply>>; -/// Send control messages to the reactor -#[derive(Debug)] -pub enum ReactorRequest<CustomRequest: Debug + Send + Sync> { - /// check if the reactor still responds - Ping, - - /// Quit the reactor - Exit, - - Custom(CustomRequest), -} - -#[derive(Debug)] -pub enum ReactorReply<CustomReply: Debug + Send + Sync> { - Pong, - Exiting, - - Custom(CustomReply), -} |