1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
use std::os::unix::net::UnixStream;

/// Queable tasks
pub enum Task {
    /// Worker inter communication
    Message(Message),
    /// Incoming socket from the UDS provider
    Socket(UnixStream),
}

#[derive(Debug, Clone, PartialEq)]
/// Output of the future
pub enum Message {
    /// Should not receive further requests and quit after current queue is processed
    ShouldQuit,
    /// Execution with no errors
    Success,
    /// Execution with errors
    Error,
    /// Reschedule socket
    Reschedule,
}