Skip to main content

EventRenderer

Trait EventRenderer 

Source
pub trait EventRenderer: Send {
    // Required methods
    fn render(&mut self, event: RuntimeEvent) -> AgentResult<()>;
    fn finish_turn(&mut self) -> AgentResult<()>;

    // Provided method
    fn finish_session(&mut self) -> AgentResult<()> { ... }
}
Expand description

Event renderer: converts RuntimeEvents into a specific output format.

Each renderer is a pure consumer — it only reads events and produces output, without modifying Agent state.

Required Methods§

Source

fn render(&mut self, event: RuntimeEvent) -> AgentResult<()>

Process one runtime event.

Source

fn finish_turn(&mut self) -> AgentResult<()>

End of current turn — renderer may flush / output summary.

Provided Methods§

Source

fn finish_session(&mut self) -> AgentResult<()>

End of entire session.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§