pub struct Event {
pub event_type: String,
pub source: String,
pub data: Value,
pub timestamp_ms: u64,
}Expand description
A legacy untyped event (kept for backward compatibility).
New code should prefer RuntimeEvent variants.
Fields§
§event_type: StringEvent type identifier (e.g., “tool_call_start”, “llm_response”).
source: StringComponent that published the event.
data: ValueEvent payload.
timestamp_ms: u64Timestamp (milliseconds since epoch).
Implementations§
Source§impl Event
impl Event
Sourcepub fn new(
event_type: impl Into<String>,
source: impl Into<String>,
data: Value,
) -> Self
pub fn new( event_type: impl Into<String>, source: impl Into<String>, data: Value, ) -> Self
Create a new event.
Sourcepub fn into_runtime_event(self) -> RuntimeEvent
pub fn into_runtime_event(self) -> RuntimeEvent
Convert a legacy Event into a RuntimeEvent::Custom.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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