messages 0.3.1

Runtime-agnostic actor library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Errors that can occur during the actor interaction workflow.

/// Errors that can occur while sending the message.
#[derive(Debug)]
pub enum SendError {
    /// Error emitted when it was attempted to send a message to the stopped actor.
    ReceiverDisconnected,
}

impl std::fmt::Display for SendError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "Actor has disconnected and is not accepting messages.")
    }
}

impl std::error::Error for SendError {}