Expand description
Procedural macros for the Maiko actor runtime.
#[derive(Event)]: Implementsmaiko::Eventfor your type, preserving generics and bounds.#[derive(Label)]: Implementsmaiko::Labelfor enums, returning variant names.#[derive(SelfRouting)]: Implementsmaiko::Topic<T> for Tfor event-as-topic routing.
Usage:
ⓘ
use maiko::{Event, Label, SelfRouting};
// Simple event without topic routing
#[derive(Clone, Debug, Event)]
enum MyEvent { Foo, Bar }
// Event with labels for observability (logging, diagrams)
#[derive(Clone, Debug, Event, Label)]
enum MyEvent { Foo, Bar }
// Event that routes itself (event-as-topic pattern)
#[derive(Clone, Debug, Hash, PartialEq, Eq, Event, SelfRouting, Label)]
enum PingPong { Ping, Pong }Derive Macros§
- Event
- Derives
Eventmarker trait for the type. - Label
- Derives
Labeltrait for enums, returning variant names. - Self
Routing - Derives
Topic<Self> for Selfenabling event-as-topic routing.