1#[derive(Debug, Clone, PartialEq)]
2#[non_exhaustive]
3pub enum ActorError {
4 Shutdown,
5}
6impl std::fmt::Display for ActorError {
7 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8 match self {
9 ActorError::Shutdown => f.write_str("Actor is already shutdown"),
10 }
11 }
12}
13
14impl std::error::Error for ActorError {}
15
16#[derive(Debug, Clone, PartialEq)]
17#[non_exhaustive]
18pub enum AddressError {
19 Closed,
20}
21
22impl std::fmt::Display for AddressError {
23 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
24 match self {
25 AddressError::Closed => f.write_str("All addresses closed for actor"),
26 }
27 }
28}
29
30impl std::error::Error for AddressError {}