Skip to main content

Module source

Module source 

Source
Expand description

Source trait: something that produces Events.

In the final wiring (Subtask 3), concrete implementations will include a mesh adapter that turns agent_mesh_sdk::RequestHandler::handle calls into events pushed to the bus.

Sources that need a response from the Lua handler (request/response round-trip) construct events via Event::with_ack and await the receiver side themselves. Sources that are fire-and-forget use Event::fire_and_forget.

Note: the next() API on this trait is kept for symmetry with pull-style sources. The canonical wiring in agent-block uses a single shared mpsc::Sender<Event> that sources push into directly (see plan.md §設計選択 A1). next() is retained for adapters that prefer a pull interface and for the in-crate mock used by #[cfg(test)] in the dispatcher module.

Traits§

Source
A producer of Events.