nexus-acto-rs 0.4.2

A Rust crate for Actors
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::actor::message::message::Message;
use std::any::Any;

#[derive(Debug, Clone, PartialEq)]
pub struct PoisonPill;

impl Message for PoisonPill {
  fn eq_message(&self, other: &dyn Message) -> bool {
    other.as_any().is::<PoisonPill>()
  }

  fn as_any(&self) -> &(dyn Any + Send + Sync + 'static) {
    self
  }
}