pub struct EventCollector { /* private fields */ }Expand description
An observer that buffers all events in memory, tagged with the thread that emitted them. Useful for step-mode embeddings (e.g. a Lambda handler) that inspect the events after the slice completes — a slice’s batch may span multiple threads.
Implementations§
Trait Implementations§
Source§impl Default for EventCollector
impl Default for EventCollector
Source§fn default() -> EventCollector
fn default() -> EventCollector
Returns the “default value” for a type. Read more
Source§impl ThreadObserver for EventCollector
impl ThreadObserver for EventCollector
Source§type SubscribeRequest = ()
type SubscribeRequest = ()
The attach-request type routed to running threads (see
RunningSystem::subscribe).
Embeddings that do not use the local driver can use ().Source§fn on_event(&self, thread_id: &ThreadId<str>, event: &AgentEvent)
fn on_event(&self, thread_id: &ThreadId<str>, event: &AgentEvent)
A display event was emitted. Called synchronously at the emission
point; keep this fast (fan-out, buffering).
Source§fn on_subscribe(
&self,
_thread_id: &ThreadId<str>,
_request: Self::SubscribeRequest,
_snapshot: ReplaySnapshot,
)
fn on_subscribe( &self, _thread_id: &ThreadId<str>, _request: Self::SubscribeRequest, _snapshot: ReplaySnapshot, )
A subscriber attached to a running thread (local driver mode only;
step-mode embeddings never receive this call). Read more
Auto Trait Implementations§
impl !Freeze for EventCollector
impl !RefUnwindSafe for EventCollector
impl !Sync for EventCollector
impl Send for EventCollector
impl Unpin for EventCollector
impl UnsafeUnpin for EventCollector
impl UnwindSafe for EventCollector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more