pub struct EventLog {
pub run_id: String,
/* private fields */
}Expand description
Append-only event log for one agent run.
Fields§
§run_id: StringImplementations§
Source§impl EventLog
impl EventLog
pub fn new(run_id: impl Into<String>) -> Self
pub fn started(&mut self)
pub fn tool_called(&mut self, tool: impl Into<String>, args: Value)
pub fn tool_result(&mut self, tool: impl Into<String>, result: Value)
pub fn response(&mut self, text: impl Into<String>)
pub fn error(&mut self, err: impl Into<String>)
pub fn finished(&mut self, reason: impl Into<String>)
pub fn custom(&mut self, label: impl Into<String>, msg: impl Into<String>)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn events(&self) -> &[Event]
pub fn by_kind(&self, kind: &EventKind) -> Vec<&Event>
pub fn has_error(&self) -> bool
pub fn is_finished(&self) -> bool
pub fn last(&self) -> Option<&Event>
pub fn tool_calls(&self) -> Vec<&Event>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventLog
impl RefUnwindSafe for EventLog
impl Send for EventLog
impl Sync for EventLog
impl Unpin for EventLog
impl UnsafeUnpin for EventLog
impl UnwindSafe for EventLog
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