maiko 0.3.1

Lightweight event-driven actor runtime with topic-based pub/sub for Tokio
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::{collections::HashSet, hash::Hash};

/// Internal representation of topic subscriptions.
///
/// This is kept separate from `Subscribe` to allow the internal
/// representation to evolve without affecting the public API.
#[derive(Debug, Clone, PartialEq, Eq)]
pub(crate) enum Subscription<T: Eq + Hash> {
    /// Subscribe to all topics (e.g., monitoring actors)
    All,
    /// Subscribe to specific topics
    Topics(HashSet<T>),
    /// Subscribe to no topics (e.g., pure event producers)
    None,
}