Expand description
Actix-web integration for anycms-event.
Provides state management, extractors, and optional SSE endpoint support.
§Quick Start
ⓘ
use anycms_event::EventBus;
use anycms_event_actix::{init_event_bus, EventBusExtractor};
let bus = EventBus::new();
let data = init_event_bus(bus);
HttpServer::new(move || {
App::new()
.app_data(data.clone())
.route("/events", web::get().to(events_handler))
})Structs§
- Event
BusExtractor - Extractor that yields an
Arc<EventBus>from Actix app_data.
Traits§
- HasEvent
Bus - Trait for types that expose an inner
EventBus.
Functions§
- init_
event_ bus - Initialize EventBus for use with Actix-web.